diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/templateforwardingrecord/TemplateForwardingRecordAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/templateforwardingrecord/TemplateForwardingRecordAppController.java new file mode 100644 index 0000000..d0e77bf --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/apis/templateforwardingrecord/TemplateForwardingRecordAppController.java @@ -0,0 +1,131 @@ +package cn.com.tenlion.controller.app.apis.templateforwardingrecord; + +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.common.component.SecurityComponent; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.app.AppTokenUser; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.templateforwardingrecord.TemplateForwardingRecordDTO; +import cn.com.tenlion.pojo.vos.templateforwardingrecord.TemplateForwardingRecordVO; +import cn.com.tenlion.service.templateforwardingrecord.ITemplateForwardingRecordService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: TemplateForwardingRecordAppController + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "名片转发记录接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/templateforwardingrecord") +public class TemplateForwardingRecordAppController extends DefaultBaseController { + + @Autowired + private ITemplateForwardingRecordService templateForwardingRecordService; + @Autowired + private SecurityComponent securityComponent; + + + + @ApiOperation(value = "新增", notes = "新增接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestHeader("token") String token, @RequestBody TemplateForwardingRecordVO templateForwardingRecordVO) throws Exception{ +// AppTokenUser fromTokenUser = securityComponent.getAppTokenUser(templateForwardingRecordVO.getTemplateFromUserId()); +// AppTokenUser toTokenUser = securityComponent.getAppTokenUser(templateForwardingRecordVO.getTemplateToUserId()); +// templateForwardingRecordVO.setTemplateFromUserId(fromTokenUser.getId()); +// templateForwardingRecordVO.setTemplateToUserId(toTokenUser.getId()); + templateForwardingRecordService.save(token, templateForwardingRecordVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除(id列表)", notes = "删除(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) { + templateForwardingRecordService.remove(token, Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改", notes = "修改接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "templateForwardingRecordId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatetemplateforwardingrecord/{templateForwardingRecordId}") + @CheckRequestBodyAnnotation + public SuccessResult updateTemplateForwardingRecord(@RequestHeader("token") String token, @PathVariable("templateForwardingRecordId") String templateForwardingRecordId, @RequestBody TemplateForwardingRecordVO templateForwardingRecordVO) { + templateForwardingRecordService.update(token, templateForwardingRecordId, templateForwardingRecordVO); + return new SuccessResult(); + } + + @ApiOperation(value = "详情(通过ID)", notes = "详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "templateForwardingRecordId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{templateForwardingRecordId}") + public TemplateForwardingRecordDTO get(@RequestHeader("token") String token, @PathVariable("templateForwardingRecordId") String templateForwardingRecordId) { + return templateForwardingRecordService.get(templateForwardingRecordId); + } + + @ApiOperation(value = "列表", notes = "列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list(@RequestHeader("token") String token) { + Map params = requestParams(); + return templateForwardingRecordService.list(params); + } + + @ApiOperation(value = "分页列表", notes = "分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagetemplateforwardingrecord") + public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return templateForwardingRecordService.listPage(page); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(templateForwardingRecordService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/templateviewrecord/TemplateViewRecordAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/templateviewrecord/TemplateViewRecordAppController.java new file mode 100644 index 0000000..c936755 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/apis/templateviewrecord/TemplateViewRecordAppController.java @@ -0,0 +1,121 @@ +package cn.com.tenlion.controller.app.apis.templateviewrecord; + +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.templateviewrecord.TemplateViewRecordDTO; +import cn.com.tenlion.pojo.vos.templateviewrecord.TemplateViewRecordVO; +import cn.com.tenlion.service.templateviewrecord.ITemplateViewRecordService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: TemplateViewRecordAppController + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "名片查看记录接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/templateviewrecord") +public class TemplateViewRecordAppController extends DefaultBaseController { + + @Autowired + private ITemplateViewRecordService templateViewRecordService; + + @ApiOperation(value = "新增", notes = "新增接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestHeader("token") String token, @RequestBody TemplateViewRecordVO templateViewRecordVO) { + templateViewRecordService.save(token, templateViewRecordVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除(id列表)", notes = "删除(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) { + templateViewRecordService.remove(token, Arrays.asList(ids.split("\\ "))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改", notes = "修改接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "templateViewRecordId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatetemplateviewrecord/{templateViewRecordId}") + @CheckRequestBodyAnnotation + public SuccessResult updateTemplateViewRecord(@RequestHeader("token") String token, @PathVariable("templateViewRecordId") String templateViewRecordId, @RequestBody TemplateViewRecordVO templateViewRecordVO) { + templateViewRecordService.update(token, templateViewRecordId, templateViewRecordVO); + return new SuccessResult(); + } + + @ApiOperation(value = "详情(通过ID)", notes = "详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "templateViewRecordId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{templateViewRecordId}") + public TemplateViewRecordDTO get(@RequestHeader("token") String token, @PathVariable("templateViewRecordId") String templateViewRecordId) { + return templateViewRecordService.get(templateViewRecordId); + } + + @ApiOperation(value = "列表", notes = "列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list(@RequestHeader("token") String token) { + Map params = requestParams(); + return templateViewRecordService.list(params); + } + + @ApiOperation(value = "分页列表", notes = "分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagetemplateviewrecord") + public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return templateViewRecordService.listPage(page); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(templateViewRecordService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/templateforwardingrecord/ITemplateForwardingRecordDao.java b/src/main/java/cn/com/tenlion/dao/templateforwardingrecord/ITemplateForwardingRecordDao.java new file mode 100644 index 0000000..3518862 --- /dev/null +++ b/src/main/java/cn/com/tenlion/dao/templateforwardingrecord/ITemplateForwardingRecordDao.java @@ -0,0 +1,131 @@ +package cn.com.tenlion.dao.templateforwardingrecord; + +import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; +import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; +import cn.com.tenlion.pojo.bos.templateforwardingrecord.TemplateForwardingRecordBO; +import cn.com.tenlion.pojo.pos.templateforwardingrecord.TemplateForwardingRecordPO; +import cn.com.tenlion.pojo.dtos.templateforwardingrecord.TemplateForwardingRecordDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ITemplateForwardingRecordDao + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +@Repository +public interface ITemplateForwardingRecordDao { + + /** + * 新增 + * + * @param params + * @throws SaveException + */ + void save(Map params) throws SaveException; + + /** + * 删除 + * + * @param params + * @throws RemoveException + */ + void remove(Map params) throws RemoveException; + + /** + * 删除(物理) + * + * @param params + * @throws RemoveException + */ + void delete(Map params) throws RemoveException; + + /** + * 修改 + * + * @param params + * @throws UpdateException + */ + void update(Map params) throws UpdateException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateForwardingRecordDTO get(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateForwardingRecordBO getBO(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateForwardingRecordPO getPO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List list(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listBO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPO(Map params) throws SearchException; + + /** + * 统计 + * + * @param params + * @return + * @throws SearchException + */ + Integer count(Map params) throws SearchException; + + + + + /** + * 统计检查 + * @param params + * @return + * @throws SearchException + */ + Integer countCheck(Map params) throws SearchException; + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/templateviewrecord/ITemplateViewRecordDao.java b/src/main/java/cn/com/tenlion/dao/templateviewrecord/ITemplateViewRecordDao.java new file mode 100644 index 0000000..d1d00da --- /dev/null +++ b/src/main/java/cn/com/tenlion/dao/templateviewrecord/ITemplateViewRecordDao.java @@ -0,0 +1,121 @@ +package cn.com.tenlion.dao.templateviewrecord; + +import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; +import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; +import cn.com.tenlion.pojo.bos.templateviewrecord.TemplateViewRecordBO; +import cn.com.tenlion.pojo.pos.templateviewrecord.TemplateViewRecordPO; +import cn.com.tenlion.pojo.dtos.templateviewrecord.TemplateViewRecordDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ITemplateViewRecordDao + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +@Repository +public interface ITemplateViewRecordDao { + + /** + * 新增 + * + * @param params + * @throws SaveException + */ + void save(Map params) throws SaveException; + + /** + * 删除 + * + * @param params + * @throws RemoveException + */ + void remove(Map params) throws RemoveException; + + /** + * 删除(物理) + * + * @param params + * @throws RemoveException + */ + void delete(Map params) throws RemoveException; + + /** + * 修改 + * + * @param params + * @throws UpdateException + */ + void update(Map params) throws UpdateException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateViewRecordDTO get(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateViewRecordBO getBO(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + TemplateViewRecordPO getPO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List list(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listBO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPO(Map params) throws SearchException; + + /** + * 统计 + * + * @param params + * @return + * @throws SearchException + */ + Integer count(Map params) throws SearchException; + + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/pojo/bos/templateforwardingrecord/TemplateForwardingRecordBO.java b/src/main/java/cn/com/tenlion/pojo/bos/templateforwardingrecord/TemplateForwardingRecordBO.java new file mode 100644 index 0000000..933ba5a --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/bos/templateforwardingrecord/TemplateForwardingRecordBO.java @@ -0,0 +1,105 @@ +package cn.com.tenlion.pojo.bos.templateforwardingrecord; + +/** + * + * @ClassName: TemplateForwardingRecordBO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +public class TemplateForwardingRecordBO { + + private String cardTemplateForwardingRecordId; + private String templateUseId; + private String templateId; + private String templateFromUserId; + private String templateToUserId; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getCardTemplateForwardingRecordId() { + return cardTemplateForwardingRecordId == null ? "" : cardTemplateForwardingRecordId.trim(); + } + + public void setCardTemplateForwardingRecordId(String cardTemplateForwardingRecordId) { + this.cardTemplateForwardingRecordId = cardTemplateForwardingRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getTemplateId() { + return templateId == null ? "" : templateId.trim(); + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getTemplateFromUserId() { + return templateFromUserId == null ? "" : templateFromUserId.trim(); + } + + public void setTemplateFromUserId(String templateFromUserId) { + this.templateFromUserId = templateFromUserId; + } + + public String getTemplateToUserId() { + return templateToUserId == null ? "" : templateToUserId.trim(); + } + + public void setTemplateToUserId(String templateToUserId) { + this.templateToUserId = templateToUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/bos/templateviewrecord/TemplateViewRecordBO.java b/src/main/java/cn/com/tenlion/pojo/bos/templateviewrecord/TemplateViewRecordBO.java new file mode 100644 index 0000000..e3f59ea --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/bos/templateviewrecord/TemplateViewRecordBO.java @@ -0,0 +1,87 @@ +package cn.com.tenlion.pojo.bos.templateviewrecord; + +/** + * + * @ClassName: TemplateViewRecordBO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +public class TemplateViewRecordBO { + + private String cardTemplateViewRecordId; + private String templateUseId; + private String cardTemplateViewUserId; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getCardTemplateViewRecordId() { + return cardTemplateViewRecordId == null ? "" : cardTemplateViewRecordId.trim(); + } + + public void setCardTemplateViewRecordId(String cardTemplateViewRecordId) { + this.cardTemplateViewRecordId = cardTemplateViewRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getCardTemplateViewUserId() { + return cardTemplateViewUserId == null ? "" : cardTemplateViewUserId.trim(); + } + + public void setCardTemplateViewUserId(String cardTemplateViewUserId) { + this.cardTemplateViewUserId = cardTemplateViewUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/templateforwardingrecord/TemplateForwardingRecordDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/templateforwardingrecord/TemplateForwardingRecordDTO.java new file mode 100644 index 0000000..c2e3b88 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/templateforwardingrecord/TemplateForwardingRecordDTO.java @@ -0,0 +1,119 @@ +package cn.com.tenlion.pojo.dtos.templateforwardingrecord; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: TemplateForwardingRecordDTO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +@ApiModel +public class TemplateForwardingRecordDTO { + + @ApiModelProperty(name = "cardTemplateForwardingRecordId", value = "主键") + private String cardTemplateForwardingRecordId; + @ApiModelProperty(name = "templateUseId", value = "模板使用ID") + private String templateUseId; + @ApiModelProperty(name = "templateId", value = "模板ID") + private String templateId; + @ApiModelProperty(name = "templateFromUserId", value = "模板来源用户ID") + private String templateFromUserId; + @ApiModelProperty(name = "templateToUserId", value = "模板去向用户ID") + private String templateToUserId; + @ApiModelProperty(name = "creator", value = "") + private String creator; + @ApiModelProperty(name = "gmtCreate", value = "") + private String gmtCreate; + @ApiModelProperty(name = "modifier", value = "") + private String modifier; + @ApiModelProperty(name = "gmtModified", value = "") + private String gmtModified; + @ApiModelProperty(name = "isDelete", value = "") + private Integer isDelete; + + public String getCardTemplateForwardingRecordId() { + return cardTemplateForwardingRecordId == null ? "" : cardTemplateForwardingRecordId.trim(); + } + + public void setCardTemplateForwardingRecordId(String cardTemplateForwardingRecordId) { + this.cardTemplateForwardingRecordId = cardTemplateForwardingRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getTemplateId() { + return templateId == null ? "" : templateId.trim(); + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getTemplateFromUserId() { + return templateFromUserId == null ? "" : templateFromUserId.trim(); + } + + public void setTemplateFromUserId(String templateFromUserId) { + this.templateFromUserId = templateFromUserId; + } + + public String getTemplateToUserId() { + return templateToUserId == null ? "" : templateToUserId.trim(); + } + + public void setTemplateToUserId(String templateToUserId) { + this.templateToUserId = templateToUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/templateviewrecord/TemplateViewRecordDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/templateviewrecord/TemplateViewRecordDTO.java new file mode 100644 index 0000000..6bd8d41 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/templateviewrecord/TemplateViewRecordDTO.java @@ -0,0 +1,99 @@ +package cn.com.tenlion.pojo.dtos.templateviewrecord; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: TemplateViewRecordDTO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +@ApiModel +public class TemplateViewRecordDTO { + + @ApiModelProperty(name = "cardTemplateViewRecordId", value = "主键") + private String cardTemplateViewRecordId; + @ApiModelProperty(name = "templateUseId", value = "模板使用id") + private String templateUseId; + @ApiModelProperty(name = "cardTemplateViewUserId", value = "查看人员Id") + private String cardTemplateViewUserId; + @ApiModelProperty(name = "creator", value = "") + private String creator; + @ApiModelProperty(name = "gmtCreate", value = "") + private String gmtCreate; + @ApiModelProperty(name = "modifier", value = "") + private String modifier; + @ApiModelProperty(name = "gmtModified", value = "") + private String gmtModified; + @ApiModelProperty(name = "isDelete", value = "") + private Integer isDelete; + + public String getCardTemplateViewRecordId() { + return cardTemplateViewRecordId == null ? "" : cardTemplateViewRecordId.trim(); + } + + public void setCardTemplateViewRecordId(String cardTemplateViewRecordId) { + this.cardTemplateViewRecordId = cardTemplateViewRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getCardTemplateViewUserId() { + return cardTemplateViewUserId == null ? "" : cardTemplateViewUserId.trim(); + } + + public void setCardTemplateViewUserId(String cardTemplateViewUserId) { + this.cardTemplateViewUserId = cardTemplateViewUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/pos/templateforwardingrecord/TemplateForwardingRecordPO.java b/src/main/java/cn/com/tenlion/pojo/pos/templateforwardingrecord/TemplateForwardingRecordPO.java new file mode 100644 index 0000000..f9bf90c --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/pos/templateforwardingrecord/TemplateForwardingRecordPO.java @@ -0,0 +1,105 @@ +package cn.com.tenlion.pojo.pos.templateforwardingrecord; + +/** + * + * @ClassName: TemplateForwardingRecordPO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +public class TemplateForwardingRecordPO { + + private String cardTemplateForwardingRecordId; + private String templateUseId; + private String templateId; + private String templateFromUserId; + private String templateToUserId; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getCardTemplateForwardingRecordId() { + return cardTemplateForwardingRecordId == null ? "" : cardTemplateForwardingRecordId.trim(); + } + + public void setCardTemplateForwardingRecordId(String cardTemplateForwardingRecordId) { + this.cardTemplateForwardingRecordId = cardTemplateForwardingRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getTemplateId() { + return templateId == null ? "" : templateId.trim(); + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getTemplateFromUserId() { + return templateFromUserId == null ? "" : templateFromUserId.trim(); + } + + public void setTemplateFromUserId(String templateFromUserId) { + this.templateFromUserId = templateFromUserId; + } + + public String getTemplateToUserId() { + return templateToUserId == null ? "" : templateToUserId.trim(); + } + + public void setTemplateToUserId(String templateToUserId) { + this.templateToUserId = templateToUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/pos/templateviewrecord/TemplateViewRecordPO.java b/src/main/java/cn/com/tenlion/pojo/pos/templateviewrecord/TemplateViewRecordPO.java new file mode 100644 index 0000000..17dd61c --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/pos/templateviewrecord/TemplateViewRecordPO.java @@ -0,0 +1,87 @@ +package cn.com.tenlion.pojo.pos.templateviewrecord; + +/** + * + * @ClassName: TemplateViewRecordPO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +public class TemplateViewRecordPO { + + private String cardTemplateViewRecordId; + private String templateUseId; + private String cardTemplateViewUserId; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getCardTemplateViewRecordId() { + return cardTemplateViewRecordId == null ? "" : cardTemplateViewRecordId.trim(); + } + + public void setCardTemplateViewRecordId(String cardTemplateViewRecordId) { + this.cardTemplateViewRecordId = cardTemplateViewRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getCardTemplateViewUserId() { + return cardTemplateViewUserId == null ? "" : cardTemplateViewUserId.trim(); + } + + public void setCardTemplateViewUserId(String cardTemplateViewUserId) { + this.cardTemplateViewUserId = cardTemplateViewUserId; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/vos/templateforwardingrecord/TemplateForwardingRecordVO.java b/src/main/java/cn/com/tenlion/pojo/vos/templateforwardingrecord/TemplateForwardingRecordVO.java new file mode 100644 index 0000000..0475040 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/vos/templateforwardingrecord/TemplateForwardingRecordVO.java @@ -0,0 +1,71 @@ +package cn.com.tenlion.pojo.vos.templateforwardingrecord; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: TemplateForwardingRecordVO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +@ApiModel +public class TemplateForwardingRecordVO { + + @ApiModelProperty(name = "cardTemplateForwardingRecordId", value = "主键") + private String cardTemplateForwardingRecordId; + @ApiModelProperty(name = "templateUseId", value = "模板使用ID") + private String templateUseId; + @ApiModelProperty(name = "templateId", value = "模板ID") + private String templateId; + @ApiModelProperty(name = "templateFromUserId", value = "模板来源用户ID") + private String templateFromUserId; + @ApiModelProperty(name = "templateToUserId", value = "模板去向用户ID") + private String templateToUserId; + + public String getCardTemplateForwardingRecordId() { + return cardTemplateForwardingRecordId == null ? "" : cardTemplateForwardingRecordId.trim(); + } + + public void setCardTemplateForwardingRecordId(String cardTemplateForwardingRecordId) { + this.cardTemplateForwardingRecordId = cardTemplateForwardingRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getTemplateId() { + return templateId == null ? "" : templateId.trim(); + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getTemplateFromUserId() { + return templateFromUserId == null ? "" : templateFromUserId.trim(); + } + + public void setTemplateFromUserId(String templateFromUserId) { + this.templateFromUserId = templateFromUserId; + } + + public String getTemplateToUserId() { + return templateToUserId == null ? "" : templateToUserId.trim(); + } + + public void setTemplateToUserId(String templateToUserId) { + this.templateToUserId = templateToUserId; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/vos/templateviewrecord/TemplateViewRecordVO.java b/src/main/java/cn/com/tenlion/pojo/vos/templateviewrecord/TemplateViewRecordVO.java new file mode 100644 index 0000000..3b48814 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/vos/templateviewrecord/TemplateViewRecordVO.java @@ -0,0 +1,51 @@ +package cn.com.tenlion.pojo.vos.templateviewrecord; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: TemplateViewRecordVO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +@ApiModel +public class TemplateViewRecordVO { + + @ApiModelProperty(name = "cardTemplateViewRecordId", value = "主键") + private String cardTemplateViewRecordId; + @ApiModelProperty(name = "templateUseId", value = "模板使用id") + private String templateUseId; + @ApiModelProperty(name = "cardTemplateViewUserId", value = "查看人员Id") + private String cardTemplateViewUserId; + + public String getCardTemplateViewRecordId() { + return cardTemplateViewRecordId == null ? "" : cardTemplateViewRecordId.trim(); + } + + public void setCardTemplateViewRecordId(String cardTemplateViewRecordId) { + this.cardTemplateViewRecordId = cardTemplateViewRecordId; + } + + public String getTemplateUseId() { + return templateUseId == null ? "" : templateUseId.trim(); + } + + public void setTemplateUseId(String templateUseId) { + this.templateUseId = templateUseId; + } + + public String getCardTemplateViewUserId() { + return cardTemplateViewUserId == null ? "" : cardTemplateViewUserId.trim(); + } + + public void setCardTemplateViewUserId(String cardTemplateViewUserId) { + this.cardTemplateViewUserId = cardTemplateViewUserId; + } + + +} diff --git a/src/main/java/cn/com/tenlion/service/templateforwardingrecord/ITemplateForwardingRecordService.java b/src/main/java/cn/com/tenlion/service/templateforwardingrecord/ITemplateForwardingRecordService.java new file mode 100644 index 0000000..aa336b1 --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/templateforwardingrecord/ITemplateForwardingRecordService.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.service.templateforwardingrecord; + +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.templateforwardingrecord.TemplateForwardingRecordDTO; +import cn.com.tenlion.pojo.vos.templateforwardingrecord.TemplateForwardingRecordVO; +import cn.com.tenlion.pojo.bos.templateforwardingrecord.TemplateForwardingRecordBO; +import cn.com.tenlion.pojo.pos.templateforwardingrecord.TemplateForwardingRecordPO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ITemplateForwardingRecordService + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +public interface ITemplateForwardingRecordService { + + /** + * 新增 + * + * @param templateForwardingRecordVO + * @return + */ + void save(TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 新增 + * + * @param token + * @param templateForwardingRecordVO + * @return + */ + void save(String token, TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 新增 + * + * @param templateForwardingRecordVO + * @return templateForwardingRecordId + */ + String saveReturnId(TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 新增 + * + * @param token + * @param templateForwardingRecordVO + * @return templateForwardingRecordId + */ + String saveReturnId(String token, TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 删除 + * + * @param ids id列表 + * @return + */ + void remove(List ids); + + + /** + * 删除 + * + * @param token + * @param ids id列表 + * @return + */ + void remove(String token, List ids); + + /** + * 删除(物理删除) + * + * @param ids id列表 + */ + void delete(List ids); + + /** + * 修改 + * + * @param templateForwardingRecordId + * @param templateForwardingRecordVO + * @return + */ + void update(String templateForwardingRecordId, TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 修改 + * + * @param token + * @param templateForwardingRecordId + * @param templateForwardingRecordVO + * @return + */ + void update(String token, String templateForwardingRecordId, TemplateForwardingRecordVO templateForwardingRecordVO); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateForwardingRecordDTO get(Map params); + + /** + * 详情 + * + * @param templateForwardingRecordId + * @return + */ + TemplateForwardingRecordDTO get(String templateForwardingRecordId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateForwardingRecordBO getBO(Map params); + + /** + * 详情 + * + * @param templateForwardingRecordId + * @return + */ + TemplateForwardingRecordBO getBO(String templateForwardingRecordId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateForwardingRecordPO getPO(Map params); + + /** + * 详情 + * + * @param templateForwardingRecordId + * @return + */ + TemplateForwardingRecordPO getPO(String templateForwardingRecordId); + + /** + * 列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/templateforwardingrecord/impl/TemplateForwardingRecordServiceImpl.java b/src/main/java/cn/com/tenlion/service/templateforwardingrecord/impl/TemplateForwardingRecordServiceImpl.java new file mode 100644 index 0000000..6a12e12 --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/templateforwardingrecord/impl/TemplateForwardingRecordServiceImpl.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.service.templateforwardingrecord.impl; + +import cn.com.tenlion.pojo.vos.templateviewrecord.TemplateViewRecordVO; +import cn.com.tenlion.service.templateviewrecord.ITemplateViewRecordService; +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.map.HashMapUtil; +import ink.wgink.util.UUIDUtil; +import cn.com.tenlion.dao.templateforwardingrecord.ITemplateForwardingRecordDao; +import cn.com.tenlion.pojo.dtos.templateforwardingrecord.TemplateForwardingRecordDTO; +import cn.com.tenlion.pojo.vos.templateforwardingrecord.TemplateForwardingRecordVO; +import cn.com.tenlion.pojo.bos.templateforwardingrecord.TemplateForwardingRecordBO; +import cn.com.tenlion.pojo.pos.templateforwardingrecord.TemplateForwardingRecordPO; +import cn.com.tenlion.service.templateforwardingrecord.ITemplateForwardingRecordService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: TemplateForwardingRecordServiceImpl + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:32:57 + * @Version: 3.0 + **/ +@Service +public class TemplateForwardingRecordServiceImpl extends DefaultBaseService implements ITemplateForwardingRecordService { + + @Autowired + private ITemplateForwardingRecordDao templateForwardingRecordDao; + + @Autowired + private ITemplateViewRecordService templateViewRecordService; + + @Override + public void save(TemplateForwardingRecordVO templateForwardingRecordVO) { + saveReturnId(templateForwardingRecordVO); + } + + @Override + public void save(String token, TemplateForwardingRecordVO templateForwardingRecordVO) { + saveReturnId(token, templateForwardingRecordVO); + } + + @Override + public String saveReturnId(TemplateForwardingRecordVO templateForwardingRecordVO) { + return saveReturnId(null, templateForwardingRecordVO); + } + + @Override + public String saveReturnId(String token, TemplateForwardingRecordVO templateForwardingRecordVO) { + String cardTemplateForwardingRecordId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(templateForwardingRecordVO); + params.put("cardTemplateForwardingRecordId", cardTemplateForwardingRecordId); + + + + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + + Integer count = templateForwardingRecordDao.countCheck(params); + if(count == 0){ + templateForwardingRecordDao.save(params); + } + //新增查看记录 + TemplateViewRecordVO viewRecordVO = new TemplateViewRecordVO(); + viewRecordVO.setTemplateUseId(templateForwardingRecordVO.getTemplateUseId()); + viewRecordVO.setCardTemplateViewUserId(templateForwardingRecordVO.getTemplateToUserId()); + templateViewRecordService.save(token,viewRecordVO); + return cardTemplateForwardingRecordId; + } + + @Override + public void remove(List ids) { + remove(null, ids); + } + + @Override + public void remove(String token, List ids) { + Map params = getHashMap(2); + params.put("cardTemplateForwardingRecordIds", ids); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + templateForwardingRecordDao.remove(params); + } + + @Override + public void delete(List ids) { + Map params = getHashMap(2); + params.put("cardTemplateForwardingRecordIds", ids); + templateForwardingRecordDao.delete(params); + } + + @Override + public void update(String templateForwardingRecordId, TemplateForwardingRecordVO templateForwardingRecordVO) { + update(null, templateForwardingRecordId, templateForwardingRecordVO); + } + + @Override + public void update(String token, String templateForwardingRecordId, TemplateForwardingRecordVO templateForwardingRecordVO) { + Map params = HashMapUtil.beanToMap(templateForwardingRecordVO); + params.put("cardTemplateForwardingRecordIds", templateForwardingRecordId); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + templateForwardingRecordDao.update(params); + } + + @Override + public TemplateForwardingRecordDTO get(Map params) { + return templateForwardingRecordDao.get(params); + } + + @Override + public TemplateForwardingRecordDTO get(String templateForwardingRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateForwardingRecordId", templateForwardingRecordId); + return get(params); + } + + @Override + public TemplateForwardingRecordBO getBO(Map params) { + return templateForwardingRecordDao.getBO(params); + } + + @Override + public TemplateForwardingRecordBO getBO(String templateForwardingRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateForwardingRecordId", templateForwardingRecordId); + return getBO(params); + } + + @Override + public TemplateForwardingRecordPO getPO(Map params) { + return templateForwardingRecordDao.getPO(params); + } + + @Override + public TemplateForwardingRecordPO getPO(String templateForwardingRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateForwardingRecordId", templateForwardingRecordId); + return getPO(params); + } + + @Override + public List list(Map params) { + return templateForwardingRecordDao.list(params); + } + + @Override + public List listBO(Map params) { + return templateForwardingRecordDao.listBO(params); + } + + @Override + public List listPO(Map params) { + return templateForwardingRecordDao.listPO(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List templateForwardingRecordDTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(templateForwardingRecordDTOs); + return new SuccessResultList<>(templateForwardingRecordDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public Integer count(Map params) { + Integer count = templateForwardingRecordDao.count(params); + return count == null ? 0 : count; + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/templateviewrecord/ITemplateViewRecordService.java b/src/main/java/cn/com/tenlion/service/templateviewrecord/ITemplateViewRecordService.java new file mode 100644 index 0000000..f3c7021 --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/templateviewrecord/ITemplateViewRecordService.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.service.templateviewrecord; + +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.templateviewrecord.TemplateViewRecordDTO; +import cn.com.tenlion.pojo.vos.templateviewrecord.TemplateViewRecordVO; +import cn.com.tenlion.pojo.bos.templateviewrecord.TemplateViewRecordBO; +import cn.com.tenlion.pojo.pos.templateviewrecord.TemplateViewRecordPO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ITemplateViewRecordService + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +public interface ITemplateViewRecordService { + + /** + * 新增 + * + * @param templateViewRecordVO + * @return + */ + void save(TemplateViewRecordVO templateViewRecordVO); + + /** + * 新增 + * + * @param token + * @param templateViewRecordVO + * @return + */ + void save(String token, TemplateViewRecordVO templateViewRecordVO); + + /** + * 新增 + * + * @param templateViewRecordVO + * @return templateViewRecordId + */ + String saveReturnId(TemplateViewRecordVO templateViewRecordVO); + + /** + * 新增 + * + * @param token + * @param templateViewRecordVO + * @return templateViewRecordId + */ + String saveReturnId(String token, TemplateViewRecordVO templateViewRecordVO); + + /** + * 删除 + * + * @param ids id列表 + * @return + */ + void remove(List ids); + + + /** + * 删除 + * + * @param token + * @param ids id列表 + * @return + */ + void remove(String token, List ids); + + /** + * 删除(物理删除) + * + * @param ids id列表 + */ + void delete(List ids); + + /** + * 修改 + * + * @param templateViewRecordId + * @param templateViewRecordVO + * @return + */ + void update(String templateViewRecordId, TemplateViewRecordVO templateViewRecordVO); + + /** + * 修改 + * + * @param token + * @param templateViewRecordId + * @param templateViewRecordVO + * @return + */ + void update(String token, String templateViewRecordId, TemplateViewRecordVO templateViewRecordVO); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateViewRecordDTO get(Map params); + + /** + * 详情 + * + * @param templateViewRecordId + * @return + */ + TemplateViewRecordDTO get(String templateViewRecordId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateViewRecordBO getBO(Map params); + + /** + * 详情 + * + * @param templateViewRecordId + * @return + */ + TemplateViewRecordBO getBO(String templateViewRecordId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + TemplateViewRecordPO getPO(Map params); + + /** + * 详情 + * + * @param templateViewRecordId + * @return + */ + TemplateViewRecordPO getPO(String templateViewRecordId); + + /** + * 列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/templateviewrecord/impl/TemplateViewRecordServiceImpl.java b/src/main/java/cn/com/tenlion/service/templateviewrecord/impl/TemplateViewRecordServiceImpl.java new file mode 100644 index 0000000..d5a13bf --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/templateviewrecord/impl/TemplateViewRecordServiceImpl.java @@ -0,0 +1,171 @@ +package cn.com.tenlion.service.templateviewrecord.impl; + +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.map.HashMapUtil; +import ink.wgink.util.UUIDUtil; +import cn.com.tenlion.dao.templateviewrecord.ITemplateViewRecordDao; +import cn.com.tenlion.pojo.dtos.templateviewrecord.TemplateViewRecordDTO; +import cn.com.tenlion.pojo.vos.templateviewrecord.TemplateViewRecordVO; +import cn.com.tenlion.pojo.bos.templateviewrecord.TemplateViewRecordBO; +import cn.com.tenlion.pojo.pos.templateviewrecord.TemplateViewRecordPO; +import cn.com.tenlion.service.templateviewrecord.ITemplateViewRecordService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: TemplateViewRecordServiceImpl + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-12 10:59:10 + * @Version: 3.0 + **/ +@Service +public class TemplateViewRecordServiceImpl extends DefaultBaseService implements ITemplateViewRecordService { + + @Autowired + private ITemplateViewRecordDao templateViewRecordDao; + + @Override + public void save(TemplateViewRecordVO templateViewRecordVO) { + saveReturnId(templateViewRecordVO); + } + + @Override + public void save(String token, TemplateViewRecordVO templateViewRecordVO) { + saveReturnId(token, templateViewRecordVO); + } + + @Override + public String saveReturnId(TemplateViewRecordVO templateViewRecordVO) { + return saveReturnId(null, templateViewRecordVO); + } + + @Override + public String saveReturnId(String token, TemplateViewRecordVO templateViewRecordVO) { + String cardTemplateViewRecordId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(templateViewRecordVO); + params.put("cardTemplateViewRecordId", cardTemplateViewRecordId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + templateViewRecordDao.save(params); + return cardTemplateViewRecordId; + } + + @Override + public void remove(List ids) { + remove(null, ids); + } + + @Override + public void remove(String token, List ids) { + Map params = getHashMap(2); + params.put("cardTemplateViewRecordId", ids); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + templateViewRecordDao.remove(params); + } + + @Override + public void delete(List ids) { + Map params = getHashMap(2); + params.put("cardTemplateViewRecordId", ids); + templateViewRecordDao.delete(params); + } + + @Override + public void update(String templateViewRecordId, TemplateViewRecordVO templateViewRecordVO) { + update(null, templateViewRecordId, templateViewRecordVO); + } + + @Override + public void update(String token, String templateViewRecordId, TemplateViewRecordVO templateViewRecordVO) { + Map params = HashMapUtil.beanToMap(templateViewRecordVO); + params.put("cardTemplateViewRecordId", templateViewRecordId); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + templateViewRecordDao.update(params); + } + + @Override + public TemplateViewRecordDTO get(Map params) { + return templateViewRecordDao.get(params); + } + + @Override + public TemplateViewRecordDTO get(String templateViewRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateViewRecordId", templateViewRecordId); + return get(params); + } + + @Override + public TemplateViewRecordBO getBO(Map params) { + return templateViewRecordDao.getBO(params); + } + + @Override + public TemplateViewRecordBO getBO(String templateViewRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateViewRecordId", templateViewRecordId); + return getBO(params); + } + + @Override + public TemplateViewRecordPO getPO(Map params) { + return templateViewRecordDao.getPO(params); + } + + @Override + public TemplateViewRecordPO getPO(String templateViewRecordId) { + Map params = super.getHashMap(2); + params.put("cardTemplateViewRecordId", templateViewRecordId); + return getPO(params); + } + + @Override + public List list(Map params) { + return templateViewRecordDao.list(params); + } + + @Override + public List listBO(Map params) { + return templateViewRecordDao.listBO(params); + } + + @Override + public List listPO(Map params) { + return templateViewRecordDao.listPO(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List templateViewRecordDTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(templateViewRecordDTOs); + return new SuccessResultList<>(templateViewRecordDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public Integer count(Map params) { + Integer count = templateViewRecordDao.count(params); + return count == null ? 0 : count; + } + +} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/templateforwardingrecord/template-forwarding-record-mapper.xml b/src/main/resources/mybatis/mapper/templateforwardingrecord/template-forwarding-record-mapper.xml new file mode 100644 index 0000000..aefc1ee --- /dev/null +++ b/src/main/resources/mybatis/mapper/templateforwardingrecord/template-forwarding-record-mapper.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO card_template_forwarding_record( + card_template_forwarding_record_id, + template_use_id, + template_id, + template_from_user_id, + template_to_user_id, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{cardTemplateForwardingRecordId}, + #{templateUseId}, + #{templateId}, + #{templateFromUserId}, + #{templateToUserId}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + + + + + UPDATE + card_template_forwarding_record + SET + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + is_delete = 1 + WHERE + + + + + + DELETE FROM + card_template_forwarding_record + WHERE + + + + + + UPDATE + card_template_forwarding_record + SET + + card_template_forwarding_record_id = #{cardTemplateForwardingRecordId}, + + + template_use_id = #{templateUseId}, + + + template_id = #{templateId}, + + + template_from_user_id = #{templateFromUserId}, + + + template_to_user_id = #{templateToUserId}, + + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + + WHERE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/templateviewrecord/template-view-record-mapper.xml b/src/main/resources/mybatis/mapper/templateviewrecord/template-view-record-mapper.xml new file mode 100644 index 0000000..1d0b9ff --- /dev/null +++ b/src/main/resources/mybatis/mapper/templateviewrecord/template-view-record-mapper.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO card_template_view_record( + card_template_view_record_id, + template_use_id, + card_template_view_user_id, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{cardTemplateViewRecordId}, + #{templateUseId}, + #{cardTemplateViewUserId}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + + + + + UPDATE + card_template_view_record + SET + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + is_delete = 1 + WHERE + + + + + + DELETE FROM + card_template_view_record + WHERE + + + + + + UPDATE + card_template_view_record + SET + + card_template_view_record_id = #{cardTemplateViewRecordId}, + + + template_use_id = #{templateUseId}, + + + card_template_view_user_id = #{cardTemplateViewUserId}, + + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + + WHERE + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file