diff --git a/.idea/artifacts/weaver_develop_jar.xml b/.idea/artifacts/weaver_develop_jar.xml index 6258dfe..2aff103 100644 --- a/.idea/artifacts/weaver_develop_jar.xml +++ b/.idea/artifacts/weaver_develop_jar.xml @@ -1,6 +1,6 @@ - $PROJECT_DIR$/out/artifacts/weaver_develop_jar + $PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib diff --git a/WEB-INF/prop/mzgsecond.properties b/WEB-INF/prop/mzgsecond.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/com/api/mzgsecond/web/PortalElementCusAction.java b/src/com/api/mzgsecond/web/PortalElementCusAction.java new file mode 100644 index 0000000..fd576e0 --- /dev/null +++ b/src/com/api/mzgsecond/web/PortalElementCusAction.java @@ -0,0 +1,13 @@ +package com.api.mzgsecond.web; + +import javax.ws.rs.Path; + +/** + * @Author liang.cheng + * @Date 2024/12/23 11:08 AM + * @Description: 美之高门户元素 + * @Version 1.0 + */ +@Path("/mzgsecond/portal") +public class PortalElementCusAction extends com.engine.mzgsecond.web.PortalElementCusAction { +} diff --git a/src/com/engine/mzgsecond/entity/BirthdayRemindVo.java b/src/com/engine/mzgsecond/entity/BirthdayRemindVo.java new file mode 100644 index 0000000..f692111 --- /dev/null +++ b/src/com/engine/mzgsecond/entity/BirthdayRemindVo.java @@ -0,0 +1,23 @@ +package com.engine.mzgsecond.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author liang.cheng + * @Date 2024/12/23 2:13 PM + * @Description: TODO + * @Version 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BirthdayRemindVo { + + private String lastname; + + private Integer day; +} diff --git a/src/com/engine/mzgsecond/entity/PersonInfoVo.java b/src/com/engine/mzgsecond/entity/PersonInfoVo.java new file mode 100644 index 0000000..36063d1 --- /dev/null +++ b/src/com/engine/mzgsecond/entity/PersonInfoVo.java @@ -0,0 +1,21 @@ +package com.engine.mzgsecond.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author liang.cheng + * @Date 2024/12/23 2:13 PM + * @Description: TODO + * @Version 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class PersonInfoVo { + + private String lastname; +} diff --git a/src/com/engine/mzgsecond/entity/TodoNoticeTrainVo.java b/src/com/engine/mzgsecond/entity/TodoNoticeTrainVo.java new file mode 100644 index 0000000..425f7d7 --- /dev/null +++ b/src/com/engine/mzgsecond/entity/TodoNoticeTrainVo.java @@ -0,0 +1,21 @@ +package com.engine.mzgsecond.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author liang.cheng + * @Date 2024/12/23 2:19 PM + * @Description: TODO + * @Version 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TodoNoticeTrainVo { + + private String title; +} diff --git a/src/com/engine/mzgsecond/service/PortalElementCusService.java b/src/com/engine/mzgsecond/service/PortalElementCusService.java new file mode 100644 index 0000000..1d7f382 --- /dev/null +++ b/src/com/engine/mzgsecond/service/PortalElementCusService.java @@ -0,0 +1,41 @@ +package com.engine.mzgsecond.service; + +import com.engine.mzgsecond.entity.BirthdayRemindVo; +import com.engine.mzgsecond.entity.PersonInfoVo; +import com.engine.mzgsecond.entity.TodoNoticeTrainVo; + +/** + * @Author liang.cheng + * @Date 2024/12/23 11:21 AM + * @Description: 元素 + * @Version 1.0 + */ +public interface PortalElementCusService { + + /** + * @Description: 个人信息 + * @Author: liang.cheng + * @Date: 2024/12/23 2:17 PM + * @param: [] + * @return: com.engine.mzgsecond.entity.PersonInfoVo + */ + PersonInfoVo personInfo(); + + /** + * @Description: 待办通知培训 + * @Author: liang.cheng + * @Date: 2024/12/23 2:21 PM + * @param: [] + * @return: com.engine.mzgsecond.entity.TodoNoticeTrainVo + */ + TodoNoticeTrainVo todoNoticeTrain(); + + /** + * @Description: 生日提醒 + * @Author: liang.cheng + * @Date: 2024/12/23 2:23 PM + * @param: [] + * @return: com.engine.mzgsecond.entity.BirthdayRemindVo + */ + BirthdayRemindVo birthdayRemind(); +} diff --git a/src/com/engine/mzgsecond/service/impl/PortalElementCusServiceImpl.java b/src/com/engine/mzgsecond/service/impl/PortalElementCusServiceImpl.java new file mode 100644 index 0000000..0642352 --- /dev/null +++ b/src/com/engine/mzgsecond/service/impl/PortalElementCusServiceImpl.java @@ -0,0 +1,30 @@ +package com.engine.mzgsecond.service.impl; + +import com.engine.core.impl.Service; +import com.engine.mzgsecond.entity.BirthdayRemindVo; +import com.engine.mzgsecond.entity.PersonInfoVo; +import com.engine.mzgsecond.entity.TodoNoticeTrainVo; +import com.engine.mzgsecond.service.PortalElementCusService; + +/** + * @Author liang.cheng + * @Date 2024/12/23 11:21 AM + * @Description: TODO + * @Version 1.0 + */ +public class PortalElementCusServiceImpl extends Service implements PortalElementCusService { + @Override + public PersonInfoVo personInfo() { + return null; + } + + @Override + public TodoNoticeTrainVo todoNoticeTrain() { + return null; + } + + @Override + public BirthdayRemindVo birthdayRemind() { + return null; + } +} diff --git a/src/com/engine/mzgsecond/web/PortalElementCusAction.java b/src/com/engine/mzgsecond/web/PortalElementCusAction.java new file mode 100644 index 0000000..54a8fcd --- /dev/null +++ b/src/com/engine/mzgsecond/web/PortalElementCusAction.java @@ -0,0 +1,80 @@ +package com.engine.mzgsecond.web; + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.engine.common.util.ServiceUtil; +import com.engine.mzgsecond.service.PortalElementCusService; +import com.engine.mzgsecond.service.impl.PortalElementCusServiceImpl; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.HashMap; +import java.util.Map; + +/** + * @Author liang.cheng + * @Date 2024/12/23 11:09 AM + * @Description: 美之高门户元素开发 + * @Version 1.0 + */ +public class PortalElementCusAction { + + private PortalElementCusService getService(User user) { + return ServiceUtil.getService(PortalElementCusServiceImpl.class, user); + } + + @GET + @Path("/element/personInfo") + @Produces(MediaType.TEXT_PLAIN) + public String personInfo(@Context HttpServletRequest request, @Context HttpServletResponse response){ + Map data = new HashMap<>(8); + try { + User user = HrmUserVarify.getUser(request, response); + data.put("datas",getService(user).personInfo()); + data.put("api_status", true); + } catch (Exception e) { + data.put("api_status", false); + data.put("msg", "catch exception : " + e.getMessage()); + } + return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect); + } + + @GET + @Path("/element/todoNoticeTrain") + @Produces(MediaType.TEXT_PLAIN) + public String todoNoticeTrain(@Context HttpServletRequest request, @Context HttpServletResponse response){ + Map data = new HashMap<>(8); + try { + User user = HrmUserVarify.getUser(request, response); + data.put("datas",getService(user).todoNoticeTrain()); + data.put("api_status", true); + } catch (Exception e) { + data.put("api_status", false); + data.put("msg", "catch exception : " + e.getMessage()); + } + return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect); + } + + @GET + @Path("/element/birthdayRemind") + @Produces(MediaType.TEXT_PLAIN) + public String birthdayRemind(@Context HttpServletRequest request, @Context HttpServletResponse response){ + Map data = new HashMap<>(8); + try { + User user = HrmUserVarify.getUser(request, response); + data.put("datas",getService(user).birthdayRemind()); + data.put("api_status", true); + } catch (Exception e) { + data.put("api_status", false); + data.put("msg", "catch exception : " + e.getMessage()); + } + return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect); + } +}