QC3445872 美之高门户元素开发
parent
c3fad4f4f7
commit
0b888c4b6b
@ -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 {
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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();
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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<String, Object> 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<String, Object> 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<String, Object> 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue