init: 代码初次提交
parent
2037165a7d
commit
1a9f412f90
|
|
@ -2,10 +2,10 @@ nacos:
|
|||
url: 192.168.20.100:30290
|
||||
namespace: jjb-dragon
|
||||
application:
|
||||
name: jjb-saas-zcloud-risk
|
||||
name: jjb-saas-zcloud-certificate
|
||||
version:
|
||||
gateway: risk
|
||||
cn-name: 风险中心
|
||||
gateway: certificate
|
||||
cn-name: 证照管理
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}${application.version}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.certificate.web;
|
||||
|
||||
|
||||
import com.zcloud.certificate.api.CorpCertificateServiceI;
|
||||
import com.zcloud.certificate.dto.CorpCertificateAddCmd;
|
||||
import com.zcloud.certificate.dto.CorpCertificatePageQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateListQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateUpdateCmd;
|
||||
import com.zcloud.certificate.dto.CorpCertificateRemoveCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.CorpCertificateCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Api(tags = "企业证照管理")
|
||||
@RequestMapping("/${application.gateway}/corpCertificate")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateController {
|
||||
private final CorpCertificateServiceI corpCertificateService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<CorpCertificateCO> add(@Validated @RequestBody CorpCertificateAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return corpCertificateService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody CorpCertificateUpdateCmd cmd) {
|
||||
corpCertificateService.edit(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<CorpCertificateCO> page(@RequestBody CorpCertificatePageQry qry) {
|
||||
return corpCertificateService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@PostMapping("/listAll")
|
||||
public MultiResponse<CorpCertificateCO> listAll(@RequestBody CorpCertificateListQry qry) {
|
||||
return corpCertificateService.list(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/getInfoById")
|
||||
public SingleResponse<CorpCertificateCO> getInfoById(@RequestParam(value = "id") Long id) {
|
||||
return corpCertificateService.getInfoById(id);
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@PutMapping("/remove")
|
||||
public Response remove(@RequestParam(value = "id") Long id) {
|
||||
corpCertificateService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@PutMapping("/removeBatch")
|
||||
public Response removeBatch(@Validated @RequestBody CorpCertificateRemoveCmd cmd) {
|
||||
corpCertificateService.removeBatch(cmd.getIds());
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
package com.zcloud.certificate.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.certificate.api.RiskPointServiceI;
|
||||
import com.zcloud.certificate.dto.RiskPointAddCmd;
|
||||
import com.zcloud.certificate.dto.RiskPointPageQry;
|
||||
import com.zcloud.certificate.dto.RiskPointUpdateCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.RiskPointCo;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Api(tags = "风险点管理")
|
||||
@RequestMapping("/risk/riskPoint")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class RiskPointController {
|
||||
private final RiskPointServiceI riskPointService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<RiskPointCo> add(@Validated @RequestBody RiskPointAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return riskPointService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<RiskPointCo> page(@RequestBody RiskPointPageQry qry) {
|
||||
return riskPointService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<RiskPointCo> listAll() {
|
||||
return MultiResponse.of(new ArrayList<RiskPointCo>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<RiskPointCo> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new RiskPointCo());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
riskPointService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
riskPointService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody RiskPointUpdateCmd riskPointUpdateCmd) {
|
||||
riskPointService.edit(riskPointUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +1,33 @@
|
|||
package com.zcloud.certificate.command;
|
||||
|
||||
import com.zcloud.certificate.domain.gateway.CorpCertificateGateway;
|
||||
import com.zcloud.certificate.domain.model.CorpCertificateE;
|
||||
import com.zcloud.certificate.dto.CorpCertificateAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.certificate.domain.gateway.RiskPointGateway;
|
||||
import com.zcloud.certificate.domain.model.RiskPointE;
|
||||
import com.zcloud.certificate.dto.RiskPointAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* 风险点新增执行器
|
||||
* web-app
|
||||
*
|
||||
* @author lin
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RiskPointAddExe {
|
||||
private final RiskPointGateway riskPointGateway;
|
||||
public class CorpCertificateAddExe {
|
||||
private final CorpCertificateGateway corpCertificateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(RiskPointAddCmd cmd) {
|
||||
RiskPointE examTypeE = new RiskPointE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
public boolean execute(CorpCertificateAddCmd cmd) {
|
||||
CorpCertificateE corpCertificateE = new CorpCertificateE();
|
||||
BeanUtils.copyProperties(cmd, corpCertificateE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = riskPointGateway.add(examTypeE);
|
||||
res = corpCertificateGateway.add(corpCertificateE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -35,3 +37,4 @@ public class RiskPointAddExe {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,33 +1,39 @@
|
|||
package com.zcloud.certificate.command;
|
||||
|
||||
import com.zcloud.certificate.domain.gateway.CorpCertificateGateway;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.certificate.domain.gateway.RiskPointGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* 风险点新增执行器
|
||||
* @author lin
|
||||
* web-app
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RiskPointRemoveExe {
|
||||
private final RiskPointGateway riskPointGateway;
|
||||
public class CorpCertificateRemoveExe {
|
||||
private final CorpCertificateGateway corpCertificateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = riskPointGateway.deletedRiskPointById(id);
|
||||
if(!res){
|
||||
boolean res = corpCertificateGateway.deletedCorpCertificateById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = riskPointGateway.deletedRiskPointByIds(ids);
|
||||
if(!res){
|
||||
boolean res = corpCertificateGateway.deletedCorpCertificateByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.certificate.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.certificate.domain.gateway.CorpCertificateGateway;
|
||||
import com.zcloud.certificate.domain.model.CorpCertificateE;
|
||||
import com.zcloud.certificate.dto.CorpCertificateUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateUpdateExe {
|
||||
private final CorpCertificateGateway corpCertificateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(CorpCertificateUpdateCmd cmd) {
|
||||
CorpCertificateE corpCertificateE = new CorpCertificateE();
|
||||
BeanUtils.copyProperties(cmd, corpCertificateE);
|
||||
boolean res = corpCertificateGateway.update(corpCertificateE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package com.zcloud.certificate.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.certificate.domain.gateway.RiskPointGateway;
|
||||
import com.zcloud.certificate.domain.model.RiskPointE;
|
||||
import com.zcloud.certificate.dto.RiskPointUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 风险点修改执行器
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RiskPointUpdateExe {
|
||||
private final RiskPointGateway riskPointGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(RiskPointUpdateCmd riskPointUpdateCmd) {
|
||||
RiskPointE riskPointE = new RiskPointE();
|
||||
BeanUtils.copyProperties(riskPointUpdateCmd, riskPointE);
|
||||
boolean res = riskPointGateway.update(riskPointE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.certificate.command.convertor;
|
||||
|
||||
import com.zcloud.certificate.dto.clientobject.CorpCertificateCO;
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface CorpCertificateCoConvertor {
|
||||
/**
|
||||
* @param corpCertificateDOs
|
||||
* @return
|
||||
*/
|
||||
List<CorpCertificateCO> converDOsToCOs(List<CorpCertificateDO> corpCertificateDOs);
|
||||
}
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.zcloud.certificate.command.convertor;
|
||||
|
||||
import com.zcloud.certificate.dto.clientobject.RiskPointCo;
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface RiskPointCoConvertor {
|
||||
/**
|
||||
* @param riskPointE
|
||||
* @return
|
||||
*/
|
||||
List<RiskPointCo> converDOsToCOs(List<RiskPointDO> riskPointE);
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.certificate.command.query;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.zcloud.certificate.command.convertor.CorpCertificateCoConvertor;
|
||||
import com.zcloud.certificate.dto.CorpCertificatePageQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateListQry;
|
||||
import com.zcloud.certificate.dto.clientobject.CorpCertificateCO;
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import com.zcloud.certificate.persistence.repository.CorpCertificateRepository;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateQueryExe {
|
||||
private final CorpCertificateRepository corpCertificateRepository;
|
||||
private final CorpCertificateCoConvertor corpCertificateCoConvertor;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public PageResponse<CorpCertificateCO> execute(CorpCertificatePageQry qry) {
|
||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||
PageResponse<CorpCertificateDO> pageResponse = corpCertificateRepository.listPage(params);
|
||||
List<CorpCertificateCO> examCenterCOS = corpCertificateCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public MultiResponse<CorpCertificateCO> execute(CorpCertificateListQry qry) {
|
||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||
List<CorpCertificateDO> list = corpCertificateRepository.list(params);
|
||||
List<CorpCertificateCO> examCenterCOS = corpCertificateCoConvertor.converDOsToCOs(list);
|
||||
return MultiResponse.of(examCenterCOS);
|
||||
}
|
||||
|
||||
public SingleResponse<CorpCertificateCO> execute(Long id) {
|
||||
SingleResponse<CorpCertificateDO> corpCertificateDO = corpCertificateRepository.getInfoById(id);
|
||||
CorpCertificateCO co = new CorpCertificateCO();
|
||||
BeanUtils.copyProperties(corpCertificateDO.getData(), co);
|
||||
return SingleResponse.of(co);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.zcloud.certificate.command.query;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.zcloud.certificate.command.convertor.RiskPointCoConvertor;
|
||||
import com.zcloud.certificate.dto.RiskPointPageQry;
|
||||
import com.zcloud.certificate.dto.clientobject.RiskPointCo;
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import com.zcloud.certificate.persistence.repository.RiskPointRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风险点新增执行器
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RiskPointQueryExe {
|
||||
private final RiskPointRepository riskPointRepository;
|
||||
private final RiskPointCoConvertor riskPointCoConvertor;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param riskPointPageQry
|
||||
* @return
|
||||
*/
|
||||
public PageResponse<RiskPointCo> execute(RiskPointPageQry riskPointPageQry) {
|
||||
PageResponse<RiskPointDO> pageResponse = riskPointRepository.listRiskPointPage(riskPointPageQry.toHashMap());
|
||||
List<RiskPointCo> examCenterCOS = riskPointCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.zcloud.certificate.service;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.zcloud.certificate.api.CorpCertificateServiceI;
|
||||
import com.zcloud.certificate.command.CorpCertificateAddExe;
|
||||
import com.zcloud.certificate.command.CorpCertificateRemoveExe;
|
||||
import com.zcloud.certificate.command.CorpCertificateUpdateExe;
|
||||
import com.zcloud.certificate.command.query.CorpCertificateQueryExe;
|
||||
import com.zcloud.certificate.dto.CorpCertificateAddCmd;
|
||||
import com.zcloud.certificate.dto.CorpCertificatePageQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateListQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateUpdateCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.CorpCertificateCO;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateServiceImpl implements CorpCertificateServiceI {
|
||||
private final CorpCertificateAddExe corpCertificateAddExe;
|
||||
private final CorpCertificateUpdateExe corpCertificateUpdateExe;
|
||||
private final CorpCertificateRemoveExe corpCertificateRemoveExe;
|
||||
private final CorpCertificateQueryExe corpCertificateQueryExe;
|
||||
|
||||
@Override
|
||||
public PageResponse<CorpCertificateCO> listPage(CorpCertificatePageQry qry) {
|
||||
return corpCertificateQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiResponse<CorpCertificateCO> list(CorpCertificateListQry qry) {
|
||||
return corpCertificateQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<CorpCertificateCO> getInfoById(Long id) {
|
||||
return corpCertificateQueryExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(CorpCertificateAddCmd cmd) {
|
||||
corpCertificateAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(CorpCertificateUpdateCmd cmd) {
|
||||
corpCertificateUpdateExe.execute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
corpCertificateRemoveExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
corpCertificateRemoveExe.execute(ids);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
package com.zcloud.certificate.service;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.certificate.api.RiskPointServiceI;
|
||||
import com.zcloud.certificate.command.RiskPointAddExe;
|
||||
import com.zcloud.certificate.command.RiskPointRemoveExe;
|
||||
import com.zcloud.certificate.command.RiskPointUpdateExe;
|
||||
import com.zcloud.certificate.command.query.RiskPointQueryExe;
|
||||
import com.zcloud.certificate.dto.RiskPointAddCmd;
|
||||
import com.zcloud.certificate.dto.RiskPointPageQry;
|
||||
import com.zcloud.certificate.dto.RiskPointUpdateCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.RiskPointCo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RiskPointServiceImpl implements RiskPointServiceI {
|
||||
private final RiskPointAddExe riskPointAddExe;
|
||||
private final RiskPointUpdateExe riskPointUpdateExe;
|
||||
private final RiskPointRemoveExe riskPointRemoveExe;
|
||||
private final RiskPointQueryExe riskPointQueryExe;
|
||||
|
||||
@Override
|
||||
public PageResponse<RiskPointCo> listPage(RiskPointPageQry qry){
|
||||
|
||||
return riskPointQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(RiskPointAddCmd cmd) {
|
||||
|
||||
riskPointAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(RiskPointUpdateCmd riskPointUpdateCmd) {
|
||||
riskPointUpdateExe.execute(riskPointUpdateCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
riskPointRemoveExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
riskPointRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.certificate.api;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.zcloud.certificate.dto.CorpCertificateAddCmd;
|
||||
import com.zcloud.certificate.dto.CorpCertificatePageQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateListQry;
|
||||
import com.zcloud.certificate.dto.CorpCertificateUpdateCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.CorpCertificateCO;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
public interface CorpCertificateServiceI {
|
||||
PageResponse<CorpCertificateCO> listPage(CorpCertificatePageQry qry);
|
||||
|
||||
MultiResponse<CorpCertificateCO> list(CorpCertificateListQry qry);
|
||||
|
||||
SingleResponse<CorpCertificateCO> getInfoById(Long id);
|
||||
|
||||
SingleResponse<CorpCertificateCO> add(CorpCertificateAddCmd cmd);
|
||||
|
||||
void edit(CorpCertificateUpdateCmd cmd);
|
||||
|
||||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package com.zcloud.certificate.api;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.certificate.dto.RiskPointAddCmd;
|
||||
import com.zcloud.certificate.dto.RiskPointPageQry;
|
||||
import com.zcloud.certificate.dto.RiskPointUpdateCmd;
|
||||
import com.zcloud.certificate.dto.clientobject.RiskPointCo;
|
||||
|
||||
public interface RiskPointServiceI {
|
||||
PageResponse<RiskPointCo> listPage(RiskPointPageQry qry);
|
||||
SingleResponse<RiskPointCo> add(RiskPointAddCmd cmd);
|
||||
|
||||
void edit(RiskPointUpdateCmd riskPointUpdateCmd);
|
||||
|
||||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateAddCmd extends Command {
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||
@NotNull(message = "企业id不能为空")
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "证书名称", name = "certificateName", required = true)
|
||||
@NotEmpty(message = "证书名称不能为空")
|
||||
private String certificateName;
|
||||
|
||||
@ApiModelProperty(value = "证书编号", name = "certificateCode", required = true)
|
||||
@NotEmpty(message = "证书编号不能为空")
|
||||
private String certificateCode;
|
||||
|
||||
@ApiModelProperty(value = "证书有效期-开始时间", name = "certificateDateStart", required = true)
|
||||
@NotNull(message = "证书有效期-开始时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date certificateDateStart;
|
||||
|
||||
@ApiModelProperty(value = "证书有效期-结束时间", name = "certificateDateEnd", required = true)
|
||||
@NotNull(message = "证书有效期-结束时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date certificateDateEnd;
|
||||
|
||||
@ApiModelProperty(value = "备注", name = "remark", required = true)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Data
|
||||
public class CorpCertificateListQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeCorpCertificateId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Data
|
||||
public class CorpCertificatePageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeCorpCertificateId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateRemoveCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "主键", name = "ids", required = true)
|
||||
@NotNull(message = "主键不能为空")
|
||||
@Size(min = 1, message = "请选择数据")
|
||||
private Long[] ids;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "主键id", name = "id", required = true)
|
||||
@NotNull(message = "主键id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "业务主键id", name = "corpCertificateId", required = true)
|
||||
@NotEmpty(message = "业务主键id不能为空")
|
||||
private String corpCertificateId;
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||
@NotNull(message = "企业id不能为空")
|
||||
private Long corpinfoId;
|
||||
@ApiModelProperty(value = "证书名称", name = "certificateName", required = true)
|
||||
@NotEmpty(message = "证书名称不能为空")
|
||||
private String certificateName;
|
||||
@ApiModelProperty(value = "证书编号", name = "certificateCode", required = true)
|
||||
@NotEmpty(message = "证书编号不能为空")
|
||||
private String certificateCode;
|
||||
@ApiModelProperty(value = "证书有效期-开始时间", name = "certificateDateStart", required = true)
|
||||
@NotNull(message = "证书有效期-开始时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date certificateDateStart;
|
||||
@ApiModelProperty(value = "证书有效期-结束时间", name = "certificateDateEnd", required = true)
|
||||
@NotNull(message = "证书有效期-结束时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date certificateDateEnd;
|
||||
@ApiModelProperty(value = "备注", name = "remark", required = true)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RiskPointAddCmd extends Command {
|
||||
@ApiModelProperty(value = "风险点名字", name = "riskPointName", required = true)
|
||||
@NotEmpty(message = "风险点名字不能为空")
|
||||
private String riskPointName;
|
||||
// @ApiModelProperty(value = "部门Id", name = "deptId", required = true)
|
||||
// @NotEmpty
|
||||
// private String deptId;
|
||||
@NotEmpty(message = "部门名字不能为空")
|
||||
@ApiModelProperty(value = "部门名字", name = "deptName", required = true)
|
||||
private String deptName;
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class RiskPointPageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "风险点名称")
|
||||
private String likeRiskPointName;
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String eqDeptName;
|
||||
|
||||
public Map<String, Object> toHashMap() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Class<?> clazz = this.getClass();
|
||||
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(this));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Class<?> superClass = clazz.getSuperclass();
|
||||
if (superClass != null) {
|
||||
Field[] superFields = superClass.getDeclaredFields();
|
||||
for (Field field : superFields) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(this));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package com.zcloud.certificate.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RiskPointUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "风险点id", name = "id", required = true)
|
||||
@NotEmpty
|
||||
private String id;
|
||||
@ApiModelProperty(value = "风险点名字", name = "riskPointName", required = true)
|
||||
@NotEmpty
|
||||
private String riskPointName;
|
||||
|
||||
@NotEmpty
|
||||
@ApiModelProperty(value = "部门名字", name = "deptName", required = true)
|
||||
private String deptName;
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.zcloud.certificate.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Data
|
||||
public class CorpCertificateCO extends ClientObject {
|
||||
//主键id
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String corpCertificateId;
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
//证书名称
|
||||
@ApiModelProperty(value = "证书名称")
|
||||
private String certificateName;
|
||||
//证书编号
|
||||
@ApiModelProperty(value = "证书编号")
|
||||
private String certificateCode;
|
||||
//证书有效期-开始时间
|
||||
@ApiModelProperty(value = "证书有效期-开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate certificateDateStart;
|
||||
//证书有效期-结束时间
|
||||
@ApiModelProperty(value = "证书有效期-结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate certificateDateEnd;
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
package com.zcloud.certificate.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RiskPointCo extends ClientObject {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "风险点名称")
|
||||
private String riskPointName;
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createName;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.certificate.domain.gateway;
|
||||
|
||||
import com.zcloud.certificate.domain.model.CorpCertificateE;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
public interface CorpCertificateGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(CorpCertificateE corpCertificateE);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(CorpCertificateE corpCertificateE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedCorpCertificateById(Long id);
|
||||
|
||||
Boolean deletedCorpCertificateByIds(Long[] id);
|
||||
}
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package com.zcloud.certificate.domain.gateway;
|
||||
|
||||
|
||||
import com.zcloud.certificate.domain.model.RiskPointE;
|
||||
|
||||
/**
|
||||
* 领域getway
|
||||
* @author lin
|
||||
*/
|
||||
public interface RiskPointGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param riskPointE 准考证管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean add(RiskPointE riskPointE) ;
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param riskPointE 准考证管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean update(RiskPointE riskPointE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deletedRiskPointById(Long id);
|
||||
Boolean deletedRiskPointByIds(Long[] id);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.certificate.domain.model;
|
||||
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Data
|
||||
public class CorpCertificateE extends BaseE {
|
||||
//主键id
|
||||
private Long id;
|
||||
//业务主键id
|
||||
private String corpCertificateId;
|
||||
//企业id
|
||||
private Long corpinfoId;
|
||||
//证书名称
|
||||
private String certificateName;
|
||||
//证书编号
|
||||
private String certificateCode;
|
||||
//证书有效期-开始时间
|
||||
private Date certificateDateStart;
|
||||
//证书有效期-结束时间
|
||||
private Date certificateDateEnd;
|
||||
//备注
|
||||
private String remark;
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package com.zcloud.certificate.domain.model;
|
||||
|
||||
import com.alibaba.cola.domain.Entity;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 领域模型,根据领域模型驱动设计
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RiskPointE extends BaseE {
|
||||
private Long id;
|
||||
private String riskPointName;
|
||||
private String deptName;
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.zcloud.certificate.gatewayimpl;
|
||||
|
||||
import com.zcloud.certificate.domain.gateway.CorpCertificateGateway;
|
||||
import com.zcloud.certificate.domain.model.CorpCertificateE;
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import com.zcloud.certificate.persistence.repository.CorpCertificateRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class CorpCertificateGatewayImpl implements CorpCertificateGateway {
|
||||
private final CorpCertificateRepository corpCertificateRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(CorpCertificateE corpCertificateE) {
|
||||
CorpCertificateDO d = new CorpCertificateDO();
|
||||
BeanUtils.copyProperties(corpCertificateE, d);
|
||||
corpCertificateRepository.save(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(CorpCertificateE corpCertificateE) {
|
||||
CorpCertificateDO d = new CorpCertificateDO();
|
||||
BeanUtils.copyProperties(corpCertificateE, d);
|
||||
corpCertificateRepository.updateById(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedCorpCertificateById(Long id) {
|
||||
return corpCertificateRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedCorpCertificateByIds(Long[] ids) {
|
||||
return corpCertificateRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package com.zcloud.certificate.gatewayimpl;
|
||||
|
||||
import com.zcloud.certificate.domain.gateway.RiskPointGateway;
|
||||
import com.zcloud.certificate.domain.model.RiskPointE;
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import com.zcloud.certificate.persistence.repository.RiskPointRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 持久层实现
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RiskPointGatewayImpl implements RiskPointGateway {
|
||||
private final RiskPointRepository riskPointRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(RiskPointE riskPointE) {
|
||||
RiskPointDO d = new RiskPointDO();
|
||||
BeanUtils.copyProperties(riskPointE, d);
|
||||
riskPointRepository.save(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(RiskPointE riskPointE) {
|
||||
RiskPointDO d = new RiskPointDO();
|
||||
BeanUtils.copyProperties(riskPointE, d);
|
||||
riskPointRepository.updateById(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedRiskPointById(Long id) {
|
||||
return riskPointRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedRiskPointByIds(Long[] ids) {
|
||||
return riskPointRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.zcloud.certificate.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Data
|
||||
@TableName("corp_certificate")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CorpCertificateDO extends BaseDO {
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String corpCertificateId;
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
//证书名称
|
||||
@ApiModelProperty(value = "证书名称")
|
||||
private String certificateName;
|
||||
//证书编号
|
||||
@ApiModelProperty(value = "证书编号")
|
||||
private String certificateCode;
|
||||
//证书有效期-开始时间
|
||||
@ApiModelProperty(value = "证书有效期-开始时间")
|
||||
private Date certificateDateStart;
|
||||
//证书有效期-结束时间
|
||||
@ApiModelProperty(value = "证书有效期-结束时间")
|
||||
private Date certificateDateEnd;
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
public CorpCertificateDO(String corpCertificateId) {
|
||||
this.corpCertificateId = corpCertificateId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.zcloud.certificate.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("risk_point")
|
||||
public class RiskPointDO extends BaseDO {
|
||||
|
||||
private String riskPointName;
|
||||
|
||||
private String deptName;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.zcloud.certificate.persistence.domainobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("risk_point")
|
||||
public class RiskPointDO extends BaseDO {
|
||||
|
||||
private String riskPointName;
|
||||
|
||||
private String deptName;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.certificate.persistence.mapper;
|
||||
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:24
|
||||
*/
|
||||
@Mapper
|
||||
public interface CorpCertificateMapper extends BaseMapper<CorpCertificateDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
package com.zcloud.certificate.persistence.mapper;
|
||||
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface RiskPointMapper extends BaseMapper<RiskPointDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.certificate.persistence.repository;
|
||||
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
public interface CorpCertificateRepository extends BaseRepository<CorpCertificateDO> {
|
||||
|
||||
PageResponse<CorpCertificateDO> listPage(Map<String, Object> params);
|
||||
|
||||
List<CorpCertificateDO> list(Map<String, Object> params);
|
||||
|
||||
SingleResponse<CorpCertificateDO> getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.zcloud.certificate.persistence.repository;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
public interface RiskPointRepository extends BaseRepository<RiskPointDO> {
|
||||
PageResponse<RiskPointDO> listRiskPointPage(Map<String,Object> parmas);
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.zcloud.certificate.persistence.repository.impl;
|
||||
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.zcloud.certificate.persistence.dataobject.CorpCertificateDO;
|
||||
import com.zcloud.certificate.persistence.mapper.CorpCertificateMapper;
|
||||
import com.zcloud.certificate.persistence.repository.CorpCertificateRepository;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author SondonYong
|
||||
* @Date 2026-01-04 15:42:25
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CorpCertificateRepositoryImpl extends BaseRepositoryImpl<CorpCertificateMapper, CorpCertificateDO> implements CorpCertificateRepository {
|
||||
private final CorpCertificateMapper corpCertificateMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<CorpCertificateDO> listPage(Map<String, Object> params) {
|
||||
IPage<CorpCertificateDO> iPage = new Query<CorpCertificateDO>().getPage(params);
|
||||
QueryWrapper<CorpCertificateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<CorpCertificateDO> result = corpCertificateMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CorpCertificateDO> list(Map<String, Object> params) {
|
||||
QueryWrapper<CorpCertificateDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<CorpCertificateDO> result = corpCertificateMapper.selectList(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<CorpCertificateDO> getInfoById(Long id) {
|
||||
return SingleResponse.of(corpCertificateMapper.selectById(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
package com.zcloud.certificate.persistence.repository.impl;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.certificate.persistence.dataobject.RiskPointDO;
|
||||
import com.zcloud.certificate.persistence.mapper.RiskPointMapper;
|
||||
import com.zcloud.certificate.persistence.repository.RiskPointRepository;
|
||||
import com.zcloud.certificate.utils.PageQueryHelper;
|
||||
import com.zcloud.certificate.utils.Query;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class RiskPointRepositoryImpl extends BaseRepositoryImpl<RiskPointMapper, RiskPointDO> implements RiskPointRepository {
|
||||
private final RiskPointMapper riskPointMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<RiskPointDO> listRiskPointPage(Map<String, Object> parmas) {
|
||||
IPage<RiskPointDO> iPage = new Query<RiskPointDO>().getPage(parmas);
|
||||
QueryWrapper<RiskPointDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<RiskPointDO> result = riskPointMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,6 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.certificate.persistence.mapper.RiskPointMapper">
|
||||
|
||||
<mapper namespace="com.zcloud.certificate.persistence.mapper.CorpCertificateMapper">
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue