Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.Agreement; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAgreementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api(tags = {"相关协议小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/agreement") |
| | | public class AgreementAppletsController { |
| | | |
| | | @Resource |
| | | private IAgreementService agreementService; |
| | | |
| | | /** |
| | | * 通过协议名获取相关协议 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "通过协议名获取相关协议",response = Agreement.class) |
| | | @GetMapping(value = "/queryByAgreement") |
| | | @Authorization |
| | | public ResultData queryByAgreement(@RequestParam("agreement") String agreement) { |
| | | return ResultData.success(agreementService.queryByAgreement(agreement)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.AreaCode2022; |
| | | import com.dg.core.service.IAreaCodeService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api(tags = {"所属地区小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applet/areaCode") |
| | | public class AreaCodeAppletsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IAreaCodeService iAreaCodeService; |
| | | |
| | | /** |
| | | * 根据指南id获取所属地区 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据指南id获取所属地区",response = AreaCode2022.class) |
| | | @GetMapping("/getAreaCodeByTransactionId") |
| | | public TableDataInfo getAreaCodeByTransactionId(@RequestParam("transactionId") Integer transactionId){ |
| | | return getDataTable(iAreaCodeService.getAreaCodeByTransactionId(transactionId)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAutomessageCommonProblemService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"常见问题小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/automessageCommonProblem") |
| | | public class AutomessageCommonProblemAppletsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IAutomessageCommonProblemService iAutomessageCommonProblemService; |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表(不分页) |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取常见问题列表(不分页)",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectList(){ |
| | | return ResultData.success(iAutomessageCommonProblemService.selectList()); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.service.IClassifyAdministrationService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 分类管理 |
| | | */ |
| | | @Api(tags = {"分类管理小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/classify") |
| | | public class ClassifyAdministrationAppletsController extends BaseController |
| | | { |
| | | |
| | | @Autowired(required = true) |
| | | IClassifyAdministrationService iClassifyAdministrationService; |
| | | |
| | | |
| | | /** |
| | | * 获取管理菜单列表(无分页已分级) |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 获取管理菜单列表(无分页已分级))",response = ClassifyAdministration.class) |
| | | @GetMapping("/selectListByParentId") |
| | | public TableDataInfo selectListByParentId(@RequestParam(value = "parentId",required = false) String parentId, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId){ |
| | | int num=iClassifyAdministrationService.countNum("",null); |
| | | if (parentId==null) |
| | | parentId="0"; |
| | | return getDataTable(iClassifyAdministrationService.selectConfigListByParentId(parentId, departmentId),num); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取分类根据id 如果是二级id则获取的是办事指南 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取分类根据id 如果是二级id则获取的是办事指南,不传参默认是0") |
| | | @GetMapping("/queryListById") |
| | | @Authorization |
| | | ResultData queryListById(@RequestParam(value = "id",required = false) Integer id){ |
| | | if(id==null) |
| | | id=0; |
| | | return iClassifyAdministrationService.queryListById(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IGuideEvolveService; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 工单管理 |
| | | */ |
| | | @Api(tags = {"工单管理小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/guideRepairOrder") |
| | | public class GuideRepairOrderAppletsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IGuideRepairOrderService iGuideRepairOrderService; |
| | | |
| | | @Autowired |
| | | private IGuideEvolveService iGuideEvolveService; |
| | | |
| | | /** |
| | | * 提交导办订单 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "提交导办订单",response = GuideRepairOrder.class) |
| | | @PostMapping("/addOrder") |
| | | @Authorization |
| | | public ResultData addOrder(@RequestBody GuideRepairOrder guideRepairOrder,@CurrentUser SysUser sysUser) { |
| | | guideRepairOrder.setSubmitUserId(sysUser.getUserId().toString()); |
| | | guideRepairOrder.setSubmitUserPhone(sysUser.getPhonenumber()); |
| | | return toAjax(iGuideRepairOrderService.addOrder(guideRepairOrder)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取详情 |
| | | * @param Id |
| | | * @param orderNum |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取订单详情") |
| | | @GetMapping("/orderdata") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam(value = "Id",required = false) String Id, |
| | | @RequestParam(value = "orderNum",required = false) String orderNum) |
| | | { |
| | | if(StringUtils.isEmpty(Id) && StringUtils.isEmpty(orderNum)) |
| | | { |
| | | return ResultData.error("id或者订单号不能都为空"); |
| | | } |
| | | |
| | | GuideRepairOrder order=iGuideRepairOrderService.selectConfigData(Id,orderNum); |
| | | order.setGuideEvolveEntities(iGuideEvolveService.selectConfigList(Id)); |
| | | |
| | | return ResultData.success(order); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 转派人员 |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @ApiOperation("转派人员") |
| | | @PostMapping("/redeploy") |
| | | @Authorization |
| | | public ResultData redeploy(@RequestBody GuideRepairOrder order, @CurrentUser SysUser sysUser) |
| | | { |
| | | if(order==null) |
| | | { |
| | | return ResultData.error("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(order.getGuideDepartmentId())) |
| | | { |
| | | return ResultData.error("导办部门id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(order.getGuideUserId())) |
| | | { |
| | | return ResultData.error("导办人员id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(order.getGuideUserPhone())) |
| | | { |
| | | return ResultData.error("导办人员电话不能为空"); |
| | | } |
| | | |
| | | //已分配 |
| | | order.setState("2"); |
| | | |
| | | //新增转派记录 |
| | | GuideEvolveEntity entity=new GuideEvolveEntity(); |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("12"); |
| | | entity.setDepartmentalId(sysUser.getDepartmentId()); |
| | | entity.setToUserId(sysUser.getUserId()+""); |
| | | entity.setFromUserId(order.getGuideUserId()); |
| | | entity.setFromDepartmentalId(order.getGuideDepartmentId()); |
| | | |
| | | iGuideEvolveService.insertConfig(entity); |
| | | |
| | | return toAjax(iGuideRepairOrderService.updateConfig(order)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 去处理 |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("去处理") |
| | | @PostMapping("/dispose") |
| | | @Authorization |
| | | public ResultData dispose(@RequestBody GuideEvolveEntity entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | if(entity==null) |
| | | { |
| | | return ResultData.error("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getGuideId())) |
| | | { |
| | | return ResultData.error("工单id不能为空"); |
| | | } |
| | | |
| | | GuideRepairOrder order=iGuideRepairOrderService.selectConfigData(entity.getGuideId(),""); |
| | | if(order==null) |
| | | { |
| | | return ResultData.error("该工单不存在!"); |
| | | } |
| | | |
| | | if(StringUtils.equals(order.getState(),"3")) |
| | | { |
| | | return ResultData.error("该工单已办结!"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(order.getState(),"2")) |
| | | { |
| | | return ResultData.error("该工单非是待办状态!"); |
| | | } |
| | | //待评价 |
| | | order.setState("4"); |
| | | //新增已办结记录 |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("4"); |
| | | entity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | entity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(entity); |
| | | return toAjax(iGuideRepairOrderService.updateConfig(order)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消导办工单 |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("取消导办工单") |
| | | @PostMapping("/cancel") |
| | | @Authorization |
| | | public ResultData cancel(@RequestBody GuideEvolveEntity entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | if(entity==null) |
| | | { |
| | | return ResultData.error("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getGuideId())) |
| | | { |
| | | return ResultData.error("工单id不能为空"); |
| | | } |
| | | |
| | | GuideRepairOrder order=iGuideRepairOrderService.selectConfigData(entity.getGuideId(),""); |
| | | if(order==null) |
| | | { |
| | | return ResultData.error("该工单不存在!"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(order.getState(),"1")) |
| | | { |
| | | return ResultData.error("该工单不能取消!"); |
| | | } |
| | | //取消状态 |
| | | order.setState("5"); |
| | | |
| | | //新增已取消记录 |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("5"); |
| | | entity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | entity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(entity); |
| | | return toAjax(iGuideRepairOrderService.updateConfig(order)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 工单评价 |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("工单评价") |
| | | @PostMapping("/evaluate") |
| | | @Authorization |
| | | public ResultData evaluate(@RequestBody GuideRepairOrder entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | if(entity==null) |
| | | { |
| | | return ResultData.error("参数不能为空"); |
| | | } |
| | | |
| | | if(entity.getId()<=0) |
| | | { |
| | | return ResultData.error("工单id不能为空"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(entity.getState(),"4")) |
| | | { |
| | | return ResultData.error("该工单不能评价!"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getEvaluateState())) |
| | | { |
| | | return ResultData.error("满意程度不能为空!"); |
| | | } |
| | | //已办结 |
| | | entity.setState("3"); |
| | | //新增已办结记录 |
| | | GuideEvolveEntity guideEvolveEntity=new GuideEvolveEntity(); |
| | | guideEvolveEntity.setCreateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setUpdateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setState("3"); |
| | | guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | |
| | | return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | } |
| | | |
| | | /** |
| | | * 获取个人中心工单数据 |
| | | * @param sysUser 当前登录人员信息 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取个人中心工单数据") |
| | | @GetMapping("/personalCenter") |
| | | @Authorization |
| | | public ResultData selectBySubmitId(@CurrentUser SysUser sysUser){ |
| | | return ResultData.success(iGuideRepairOrderService.selectBySubmitId(sysUser.getUserId().toString())); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @Api(tags = {"组织架构小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/organization") |
| | | public class OrganizationAppletsController extends BaseController |
| | | { |
| | | |
| | | @Autowired(required = true) |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | /** |
| | | * 查询机构列表 |
| | | */ |
| | | @ApiOperation("查询机构列表") |
| | | @GetMapping("/getList") |
| | | public TableDataInfo selectConfigList() |
| | | { |
| | | return getDataTable(iOrganizationChartService.selectConfigList("","")); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询机构列表(不分级不分页按等级排序) |
| | | */ |
| | | @ApiOperation(value = "查询机构列表(不分级不分页按等级排序)",response = OrganizationChartEntity.class) |
| | | @GetMapping("/selectList") |
| | | public TableDataInfo selectList(){ |
| | | return getDataTable(iOrganizationChartService.selectList()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查组织机构 |
| | | */ |
| | | @ApiOperation(value = "根据id查取消组织机构",response = OrganizationChartEntity.class) |
| | | @GetMapping("/selectById") |
| | | @Authorization |
| | | ResultData selectConfigById(@RequestParam("id") String id){ |
| | | return ResultData.success(iOrganizationChartService.selectConfigById(id)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.Slideshow; |
| | | import com.dg.core.service.ISlideshowService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = {"轮播图小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/slideshow") |
| | | public class SlideshowAppletsController extends BaseController { |
| | | |
| | | @Autowired(required = true) |
| | | ISlideshowService iSlideshowService; |
| | | |
| | | /** |
| | | * 查询轮播图列表(不分页) |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询轮播图列表(不分页)",response = Slideshow.class) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectList(){ |
| | | return ResultData.success(iSlideshowService.selectList()); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 根据id 查询轮播图数据 |
| | | * |
| | | * @return 参数配置信息 |
| | | */ |
| | | @ApiOperation(value = "根据id 查询轮播图数据",response = Slideshow.class) |
| | | @GetMapping("/selectById") |
| | | public ResultData queryById(Integer id){ |
| | | return ResultData.success(iSlideshowService.queryById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.db.manual.pojo.QueryResults; |
| | | import com.dg.core.db.manual.pojo.RecommendResult; |
| | | import com.dg.core.db.manual.pojo.Search; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"导办事项管理(及办事指南)小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/transaction") |
| | | public class TransactionEventAppletsController extends BaseController |
| | | { |
| | | |
| | | @Autowired(required = true) |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | /** |
| | | * 查询导办事务详情 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @ApiOperation("查询导办事务详情") |
| | | @GetMapping("/getData") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | | return ResultData.success(iTransactionEventService.selectConfigData(Id,sysUser)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导办事物列表(不分页) |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导办事物列表(不分页)",response = TransactionEvent.class) |
| | | @GetMapping("/selectList") |
| | | public TableDataInfo selectList() |
| | | { |
| | | return getDataTable(iTransactionEventService.selectList()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导办事务搜索(无分页用于小程序) |
| | | * @param keyWord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导办事务搜索(无分页用于小程序)",response = QueryResults.class) |
| | | @GetMapping("/queryKeyWord") |
| | | @Authorization |
| | | public QueryResults queryKeyWord(@RequestParam(value = "keyWord",required = false) String keyWord) |
| | | { |
| | | QueryResults queryResults = iTransactionEventService.queryMatterNameList(keyWord); |
| | | return queryResults; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据分类查询导办事务 |
| | | * @param classifyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据分类查询导办事务",response = TransactionEvent.class) |
| | | @GetMapping("/queryByClassifyIdList") |
| | | public TableDataInfo queryByClassifyIdList(@RequestParam("classifyId") String classifyId,@RequestParam(required = false,name="departmentId") Integer departmentId){ |
| | | return getDataTable(iTransactionEventService.queryByClassifyIdList(classifyId,departmentId),iTransactionEventService.countNumByClassifyIdList(classifyId,departmentId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询导办事务求和 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询导办事务求和",response = TransactionEvent.class) |
| | | @GetMapping("/sumTransactionNum") |
| | | public ResultData sumTransactionNum(){ |
| | | return ResultData.success(iTransactionEventService.sumTransactionNum()); |
| | | } |
| | | |
| | | /** |
| | | * 智能咨询 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "智能咨询",response = RecommendResult.class) |
| | | @GetMapping("/smartConsulting") |
| | | @Authorization |
| | | public RecommendResult smartConsulting(@RequestParam("keyWord") String keyWord){ |
| | | return iTransactionEventService.smartConsulting(keyWord); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.dg.core.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.AreaCode2022; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.ElseAccessoryEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAutomessageCommonProblemService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private IAutomessageCommonProblemService iAutomessageCommonProblemService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表(不分页) |
| | | * 获取常见问题列表(分页) |
| | | * @param title |
| | | * @param content |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据指南id获取所属地区",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectList(){ |
| | | return ResultData.success(iAutomessageCommonProblemService.selectList()); |
| | | @ApiOperation(value = "获取常见问题列表(分页)",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/selectConfigList") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "title",required = false) String title, |
| | | @RequestParam(value = "content",required = false) String content){ |
| | | Page<AutomessageCommonProblem> pageParam = new Page<>(pageNum,pageSize); |
| | | List<AutomessageCommonProblem> list = iAutomessageCommonProblemService.selectConfigList(pageParam,pageSize,title,content); |
| | | int num=iAutomessageCommonProblemService.countAutomessageCommonProblem(title,content); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | | /** |
| | | * 添加常见问题数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "添加常见问题数据)",response = AutomessageCommonProblem.class) |
| | | @PostMapping("/add") |
| | | @Authorization |
| | | ResultData add(@RequestBody AutomessageCommonProblem automessageCommonProblem,@CurrentUser SysUser sysUser){ |
| | | automessageCommonProblem.setCreateUserId(sysUser.getUserId().toString()); |
| | | automessageCommonProblem.setUpdateUserId(sysUser.getUserId().toString()); |
| | | return iAutomessageCommonProblemService.add(automessageCommonProblem); |
| | | } |
| | | |
| | | /** |
| | | * 修改常见问题数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "修改常见问题数据)",response = AutomessageCommonProblem.class) |
| | | @PostMapping("/update") |
| | | @Authorization |
| | | ResultData update(@RequestBody AutomessageCommonProblem automessageCommonProblem,@CurrentUser SysUser sysUser){ |
| | | automessageCommonProblem.setUpdateUserId(sysUser.getUserId().toString()); |
| | | return iAutomessageCommonProblemService.update(automessageCommonProblem); |
| | | } |
| | | |
| | | /** |
| | | * 删除常见问题数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除常见问题数据)",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/delete") |
| | | @Authorization |
| | | ResultData delete( @RequestParam(value = "id") Integer id){ |
| | | return iAutomessageCommonProblemService.delete(id); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = " 获取管理菜单列表(已分级)",response = ClassifyAdministration.class) |
| | | @GetMapping("/getListByParentId") |
| | | @Authorization |
| | | public TableDataInfo selectConfigListByParentId(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "parentId",required = false) String parentId, |
| | |
| | | Page<ClassifyAdministration> pageParam = new Page<>(pageNum,pageSize); |
| | | return getDataTable(iClassifyAdministrationService.selectRootList(pageParam,pageSize,parentId,departmentId),num); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return toAjax(iClassifyAdministrationService.deleteConfigById(Id)); |
| | | } |
| | | |
| | | /** |
| | | * 获取分类根据id 如果是二级id则获取的是办事指南 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取分类根据id 如果是二级id则获取的是办事指南,不传参默认是0") |
| | | @GetMapping("/queryListById") |
| | | @Authorization |
| | | ResultData queryListById(@RequestParam(value = "id",required = false) Integer id){ |
| | | if(id==null) |
| | | id=0; |
| | | return iClassifyAdministrationService.queryListById(id); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据分离查询导办事务 |
| | | * 根据分类id查询导办事务(分页) |
| | | * @param classifyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据分类查询导办事务",response = TransactionEvent.class) |
| | | @GetMapping("/queryByClassifyIdList") |
| | | public TableDataInfo queryByClassifyIdList(@RequestParam("classifyId") String classifyId,@RequestParam(required = false,name="departmentId") Integer departmentId){ |
| | | return getDataTable(iTransactionEventService.queryByClassifyIdList(classifyId,departmentId),iTransactionEventService.countNumByClassifyIdList(classifyId,departmentId)); |
| | | @ApiOperation(value = "根据分类id查询导办事务(分页)",response = TransactionEvent.class) |
| | | @GetMapping("/queryByClassifyIdConfigList") |
| | | public TableDataInfo queryByClassifyIdConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam("classifyId") String classifyId, |
| | | @RequestParam(required = false,name="departmentId") Integer departmentId){ |
| | | Assert.notNull(pageNum, "pageNum 不能为空"); |
| | | Assert.notNull(pageSize, "pageSize 不能为空"); |
| | | Page<TransactionEvent> pageParam = new Page<>(pageNum,pageSize); |
| | | return getDataTable(iTransactionEventService.queryByClassifyIdList(pageParam,pageSize,classifyId,departmentId),iTransactionEventService.countNumByClassifyIdList(classifyId,departmentId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.dg.core.db.gen.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModelProperty("创建人id") |
| | | private String createUserId; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "updateUserName", value = "上次修改人") |
| | | private String updateUserName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "createUserName", value = "创建人") |
| | | private String createUserName; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | @ApiModel("分类管理实体类") |
| | | @Data |
| | | @TableName("automessage_classify_administration") |
| | | public class ClassifyAdministration implements Serializable |
| | | { |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | @Data |
| | | @ApiModel("其他附件管理实体类") |
| | | @TableName("automessage_else_accessory") |
| | | public class ElseAccessoryEntity implements Serializable |
| | | { |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | @Data |
| | | @ApiModel("导办工单进展记录表") |
| | | @TableName("automessage_guide_evolve") |
| | | public class GuideEvolveEntity implements Serializable |
| | | { |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | @ApiModel("菜单实体类") |
| | | @Data |
| | | @TableName("automessage_menu") |
| | | public class MenuEntity implements Serializable |
| | | { |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | @ApiModel("回复模板实体类") |
| | | @Data |
| | | @TableName |
| | | public class ReplyTemplateEntity implements Serializable |
| | | { |
| | | /** |
| | |
| | | package com.dg.core.db.gen.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface AutomessageCommonProblemMapper extends BaseMapper<AutomessageCommonProblem> { |
| | | |
| | | /** |
| | | * 获取常见问题列表(分页) |
| | | * @param page |
| | | * @param state |
| | | * @return |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(IPage<AutomessageCommonProblem> page, Integer state, @Param("title") String title, @Param("content") String content); |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表统计数量 |
| | | * @return |
| | | */ |
| | | Integer countConfigList(@Param("title") String title, @Param("content") String content); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<TransactionEvent> queryByClassifyIdList(@Param("classifyId") String classifyId,@Param("departmentId") Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 根据分离查询导办事务(分页) |
| | | * @param classifyId |
| | | * @return |
| | | * |
| | | */ |
| | | List<TransactionEvent> queryByClassifyIdList(IPage<TransactionEvent> page, Integer state,@Param("classifyId") String classifyId,@Param("departmentId") Integer departmentId); |
| | | |
| | | /** |
| | | * 查询导办事务求和 |
| | | * @return |
| | |
| | | */ |
| | | List<Search> selectSearch(IPage<Search> page, Integer state, String keyWord); |
| | | |
| | | |
| | | /** |
| | | * 根据关键词导办事务(部门也会统计进去)搜索(分页)(小程序) |
| | | * @param keyWord |
| | | * @return |
| | | */ |
| | | List<Search> selectSearchList(String keyWord); |
| | | |
| | | /** |
| | | * 根据关键词导办事务(部门也会统计进去)搜索(不分页) |
| | | * @param keyWord |
| | |
| | | @ApiModelProperty("浏览次数") |
| | | private Integer views; |
| | | |
| | | @ApiModelProperty("搜索数据类型1.办事部门2.办事指南 3.推荐办事指南") |
| | | @ApiModelProperty("搜索数据类型1.办事部门2.办事指南 3.推荐办事指南4.分类") |
| | | private Integer type; |
| | | } |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<AutomessageCommonProblem> selectList(); |
| | | |
| | | /** |
| | | * 获取常见问题列表(分页) |
| | | * @param page |
| | | * @param state |
| | | * @return |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(IPage<AutomessageCommonProblem> page, Integer state, String title, String content); |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表统计数量 |
| | | * @return |
| | | */ |
| | | Integer countAutomessageCommonProblem( String title, String content); |
| | | |
| | | |
| | | /** |
| | | * 添加常见问题数据 |
| | | * @return |
| | | */ |
| | | ResultData add(AutomessageCommonProblem automessageCommonProblem); |
| | | |
| | | /** |
| | | * 修改常见问题数据 |
| | | * @return |
| | | */ |
| | | ResultData update(AutomessageCommonProblem automessageCommonProblem); |
| | | |
| | | /** |
| | | * 删除常见问题数据 |
| | | * @return |
| | | */ |
| | | ResultData delete(Integer id); |
| | | |
| | | |
| | | } |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import org.springframework.data.repository.query.Param; |
| | |
| | | * @return |
| | | */ |
| | | List<ClassifyAdministration> selectRootList (IPage<ClassifyAdministration> page, Integer stat,String parentId,Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 获取分类根据id 如果是二级id则获取的是办事指南 |
| | | * @return |
| | | */ |
| | | ResultData queryListById(Integer id); |
| | | } |
| | |
| | | */ |
| | | QueryResults queryMatterNameList(IPage<Search> page, Integer state,Integer recommendSize, String keyWord); |
| | | |
| | | |
| | | /** |
| | | * 导办事务搜索(无分页用于小程序) |
| | | * @param keyWord |
| | | * @return |
| | | */ |
| | | QueryResults queryMatterNameList(String keyWord); |
| | | |
| | | /** |
| | | * 导办事务搜索统计数量 |
| | | * @param matterName |
| | |
| | | int countNumByMatterName(String matterName); |
| | | |
| | | /** |
| | | * 根据分离查询导办事务 |
| | | * 根据分类id查询导办事务 |
| | | * @param classifyId |
| | | * @return |
| | | */ |
| | | List<TransactionEvent> queryByClassifyIdList(String classifyId,Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 根据分类id查询导办事务(分页) |
| | | * @param classifyId |
| | | * @return |
| | | */ |
| | | List<TransactionEvent> queryByClassifyIdList(IPage<TransactionEvent> page, Integer state,String classifyId,Integer departmentId); |
| | | |
| | | /** |
| | | * 根据查询时间查询导办事务 |
| | | * @return |
| | |
| | | package com.dg.core.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.mapper.AutomessageCommonProblemMapper; |
| | | import com.dg.core.service.IAutomessageCommonProblemService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | public List<AutomessageCommonProblem> selectList(){ |
| | | return baseMapper.selectList(new QueryWrapper<AutomessageCommonProblem>().lambda()); |
| | | } |
| | | |
| | | @Override |
| | | public List<AutomessageCommonProblem> selectConfigList(IPage<AutomessageCommonProblem> page, Integer state, String title, String content) { |
| | | return baseMapper.selectConfigList(page,state,title,content); |
| | | } |
| | | |
| | | @Override |
| | | public Integer countAutomessageCommonProblem( String title, String content){ |
| | | return baseMapper.countConfigList(title,content); |
| | | } |
| | | |
| | | @Override |
| | | public ResultData add(AutomessageCommonProblem automessageCommonProblem){ |
| | | if (automessageCommonProblem.getContent()==null){ |
| | | return ResultData.error("常见问题不能空"); |
| | | } |
| | | if (automessageCommonProblem.getTitle()==null){ |
| | | return ResultData.error("回答内容题不能空"); |
| | | } |
| | | automessageCommonProblem.setCreateTime(LocalDateTime.now()); |
| | | automessageCommonProblem.setUpdateTime(LocalDateTime.now()); |
| | | int insert = baseMapper.insert(automessageCommonProblem); |
| | | if (insert>0){ |
| | | return ResultData.success(); |
| | | } |
| | | else { |
| | | return ResultData.error("添加失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ResultData update(AutomessageCommonProblem automessageCommonProblem){ |
| | | if (automessageCommonProblem.getContent()==null){ |
| | | return ResultData.error("常见问题不能空"); |
| | | } |
| | | if (automessageCommonProblem.getTitle()==null){ |
| | | return ResultData.error("回答内容题不能空"); |
| | | } |
| | | automessageCommonProblem.setUpdateTime(LocalDateTime.now()); |
| | | int i = baseMapper.updateById(automessageCommonProblem); |
| | | if (i>0){ |
| | | return ResultData.success(); |
| | | } |
| | | else { |
| | | return ResultData.error("修改失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ResultData delete(Integer id){ |
| | | int i = baseMapper.deleteById(id); |
| | | if (i>0){ |
| | | return ResultData.success(); |
| | | } |
| | | else { |
| | | return ResultData.error("删除失败"); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.db.gen.mapper.ClassifyAdministrationMapper; |
| | | import com.dg.core.db.gen.mapper.TransactionEventMapper; |
| | | import com.dg.core.service.IClassifyAdministrationService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class ClassifyAdministrationImpl extends ServiceImpl<ClassifyAdministrationMapper, ClassifyAdministration> |
| | | implements IClassifyAdministrationService |
| | | { |
| | | |
| | | |
| | | @Resource |
| | | private TransactionEventMapper transactionEventMapper; |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> selectConfigList(String classifyName, String classifyGrade) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultData queryListById(Integer id){ |
| | | if (id.equals(0)){ |
| | | return ResultData.success(baseMapper.selectList(new QueryWrapper<ClassifyAdministration>().lambda() |
| | | .eq(ClassifyAdministration::getParentId,0))); |
| | | } |
| | | ClassifyAdministration classifyAdministration = baseMapper.selectOne(new QueryWrapper<ClassifyAdministration>().lambda() |
| | | .eq(ClassifyAdministration::getId, id)); |
| | | if (classifyAdministration.getClassifyGrade().equals("1")){ |
| | | return ResultData.success(baseMapper.selectList(new QueryWrapper<ClassifyAdministration>().lambda() |
| | | .eq(ClassifyAdministration::getParentId,classifyAdministration.getId()))); |
| | | }else if (classifyAdministration.getClassifyGrade().equals("2")){ |
| | | return ResultData.success(transactionEventMapper.queryByClassifyIdList(id.toString(),null)); |
| | | } |
| | | return ResultData.error(); |
| | | } |
| | | |
| | | @Override |
| | | public int insertConfig(ClassifyAdministration entity) { |
| | | return baseMapper.insertConfig(entity); |
| | | } |
| | |
| | | return queryResults; |
| | | } |
| | | |
| | | @Override |
| | | public QueryResults queryMatterNameList(String keyWord) { |
| | | QueryResults queryResults = new QueryResults(); |
| | | List<Search> searches = baseMapper.selectSearchList(keyWord); |
| | | queryResults.setSearchList(searches); |
| | | List<Search> searchesAssociate = baseMapper.selectSearchAssociate(keyWord); |
| | | queryResults.setTransactionEventList(searchesAssociate); |
| | | queryResults.setKeywordEntityList( keywordMapper.selectByName(keyWord)); |
| | | return queryResults; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public RecommendResult smartConsulting(String keyWord){ |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> queryByClassifyIdList(IPage<TransactionEvent> page, Integer state,String classifyId,Integer departmentId) { |
| | | return baseMapper.queryByClassifyIdList(page,state,classifyId,departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> queryByQueryTime() { |
| | | List<TransactionEvent> transactionEvents = baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda().orderByDesc(TransactionEvent::getQueryTime)); |
| | | return transactionEvents; |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dg.core.db.gen.mapper.AutomessageCommonProblemMapper"> |
| | | <resultMap type="com.dg.core.db.gen.entity.AutomessageCommonProblem" id="AutomessageCommonProblemResult"> |
| | | <id property="id" column="id" /> |
| | | <id property="title" column="title" /> |
| | | <id property="content" column="content" /> |
| | | <id property="createTime" column="create_time" /> |
| | | <id property="updateTime" column="update_time" /> |
| | | <id property="updateUserId" column="update_user_id" /> |
| | | <id property="createUserId" column="create_user_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectAutomessageCommonProblemResul"> |
| | | SELECT |
| | | id, |
| | | title, |
| | | content, |
| | | create_time, |
| | | update_time, |
| | | (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName, |
| | | update_user_id, |
| | | (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName, |
| | | create_user_id |
| | | FROM |
| | | automessage_common_problem a |
| | | </sql> |
| | | |
| | | <select id="selectConfigList" resultMap="AutomessageCommonProblemResult"> |
| | | <include refid="selectAutomessageCommonProblemResul" /> |
| | | <where> |
| | | <if test="title!=null and title!=''"> |
| | | and title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="content!=null and content!=''"> |
| | | and content like concat('%', #{content}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="countConfigList" resultType="integer"> |
| | | select count(*) from automessage_common_problem |
| | | <where> |
| | | <if test="title!=null and title!=''"> |
| | | and title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="content!=null and content!=''"> |
| | | and content like concat('%', #{content}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | parent_id=#{parentId} |
| | | <if test="departmentId!=null"> |
| | | and id in ( |
| | | select classify_id from transaction_event where department_id=#{departmentId} UNION |
| | | select parent_id from classify_administration where id in (select classify_id FROM transaction_event where department_id=#{departmentId}) ) |
| | | select classify_id from automessage_transaction_event where department_id=#{departmentId} UNION |
| | | select parent_id from automessage_classify_administration where id in (select classify_id FROM automessage_transaction_event where department_id=#{departmentId}) ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <id property="resume" column="resume" /> |
| | | <id property="contactNumber" column="contact_number" /> |
| | | <id property="departmentalApplication" column="departmental_application" /> |
| | | <id property="updateUserId" column="update_user_id" /> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | where id= #{id} |
| | | </select> |
| | | |
| | | <select id="queryList" resultMap="OrganizationChartResult"> |
| | | <include refid="selectOrganizationChartVo"/> |
| | | <where> |
| | | <if test="parentId != null and parentId != ''"> |
| | | AND parent_id=#{parentId} |
| | | </if> |
| | | |
| | | <if test="grade != null and grade != ''"> |
| | | AND grade=#{grade} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectConfigList" resultMap="OrganizationChartResult"> |
| | | <include refid="selectOrganizationChartVo"/> |
| | | <where> |
| | |
| | | <if test="grade != null and grade != ''"> |
| | | AND grade=#{grade} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="selectByKeyWord" resultMap="OrganizationChartResult"> |
| | |
| | | where k.title like concat('%',#{keyWord}, '%') or k.content like concat('%', #{keyWord}, '%') |
| | | </select> |
| | | |
| | | <select id="selectSearch" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | <select id="selectSearchList" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select id,title,content,views, type FROM( |
| | | select id,organization_name title,resume content,null views,1 type from automessage_organization_chart UNION |
| | | select id,classify_name title,null content,null views,4 type from automessage_classify_administration UNION |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.utlis.RSAUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | @ApiOperation("天府通办登录") |
| | | @PostMapping("tfLogin") |
| | | public R tfLogin(@RequestBody UuLoginVO uuLoginVO){ |
| | | try { |
| | | uuLoginVO.setMobile(RSAUtils.decrypt(uuLoginVO.getMobile(), Constants.PRIVATE_KEY)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail(); |
| | | } |
| | | userService.tfLogin(uuLoginVO); |
| | | R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0"); |
| | | return r; |
| | |
| | | <artifactId>javase</artifactId> |
| | | <version>3.1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.jsoup</groupId> |
| | | <artifactId>jsoup</artifactId> |
| | | <version>1.13.1</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | public static final String QUERY="query"; |
| | | public static final String DELETE="delete"; |
| | | public static final String VILLAGE="村"; |
| | | |
| | | /** |
| | | * 天府通办解密私钥 |
| | | * */ |
| | | public static final String PRIVATE_KEY="MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJJuFUH/4m9H5hCCzxtd9BxpjWlG9gbejqiJpV0XJKaU1V7xDBJasswxPY7Zc15RoxWClPoKPwKrbWKm49dgBJebJq5xd4sLCSbboxRkKxpRiJHMZ4LJjYa5h9Ei9RyfoUzqGHqH4UrDy3m3IwPiP19cIBqoU50shyQf92ZpcGZhAgMBAAECgYEAiadU8pODoUs82x6tZbPALQmJN4PO+wwznfqv6sA74yGdKECAMazz0oMjtGt1SiCCqFD2jcweCftvvELZg3mvNg1V0vRQRD1ZCA8HDp8DXm20d11K3+RX39tR4KgyyM3HsSEhkUDujMxKIpYjyiB5iEtV7Ja9bZ2fROszq+mUIqUCQQDQQf6vWRMLBqfnDcU77vuDGOhXbjkF2ytLxLW3fbKaW3GWvC3n93zPM+mcvWSXgkl448+jFjpMktm1Vn+w+YX3AkEAs/+bbRbod6AcVbLu8C5E44qDRoRpu+LF7Cphp8tlSAIRjm2yGP5acMWGRUtH9MF2QJYPF0PgDzdmUSVqWnCAZwJBALnSuRri4wAKn1SmT+ALfLZcSiyBODZGeppv2ijw6qWahH8YR+ncRaxoyMFHqPMbmM1akJIXqktbGREaLnPOIb8CQQCdJycJaL3Qa98xR4dr9cm5rF6PO96g5w6M8jfO6ztjUkMHymh7f99wpFRlvaN2Y06edyV315ARWPohEPy5N44zAkBlLuDHLm1TkTTAfdlL5r2OcdjpaJYloTdn05Mp3+J+w1zTX8k6Mz8lFZtLUcoMeTfQ9rm/+u2KwxS8NljtSZWH"; |
| | | } |
| | |
| | | /** |
| | | * 启用状态(0:停用,1:启用) |
| | | */ |
| | | @ApiModelProperty("启用状态(0:停用,1:启用)") |
| | | @ApiModelProperty("启用状态(false:停用,true:启用)") |
| | | private Boolean enabled; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 删除标识(0:未删除,1:已删除) |
| | | */ |
| | | @ApiModelProperty("0:未删除,1:已删除") |
| | | @ApiModelProperty("false:未删除,true:已删除") |
| | | private Boolean deleteFlag; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import org.apache.commons.codec.binary.Base64; |
| | | import org.jsoup.internal.StringUtil; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import java.security.*; |
| | | import java.security.interfaces.RSAPrivateKey; |
| | | import java.security.interfaces.RSAPublicKey; |
| | | import java.security.spec.PKCS8EncodedKeySpec; |
| | | import java.security.spec.X509EncodedKeySpec; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | | public class RSAUtils { |
| | | |
| | | private static Map<Integer, String> keyMap = new HashMap<Integer, String>(); // 用于封装随机产生的公钥与私钥 |
| | | |
| | | |
| | | /** |
| | | * 随机生成密钥对 |
| | | * |
| | | * @throws NoSuchAlgorithmException |
| | | */ |
| | | public static void genKeyPair() throws NoSuchAlgorithmException { |
| | | // KeyPairGenerator类用于生成公钥和私钥对,基于RSA算法生成对象 |
| | | KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA"); |
| | | // 初始化密钥对生成器,密钥大小为96-1024位 |
| | | keyPairGen.initialize(1024, new SecureRandom()); |
| | | // 生成一个密钥对,保存在keyPair中 |
| | | KeyPair keyPair = keyPairGen.generateKeyPair(); |
| | | RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); // 得到私钥 |
| | | RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); // 得到公钥 |
| | | String publicKeyString = new String(Base64.encodeBase64(publicKey.getEncoded())); |
| | | // 得到私钥字符串 |
| | | String privateKeyString = new String(Base64.encodeBase64((privateKey.getEncoded()))); |
| | | // 将公钥和私钥保存到Map |
| | | System.out.println("publicKeyString:" + publicKeyString); |
| | | System.out.println("privateKeyString:" + privateKeyString); |
| | | keyMap.put(0, publicKeyString); // 0表示公钥 |
| | | keyMap.put(1, privateKeyString); // 1表示私钥 |
| | | } |
| | | |
| | | /** |
| | | * RSA公钥加密 |
| | | * |
| | | * @param str 加密字符串 |
| | | * @param publicKey 公钥 |
| | | * @return 密文 |
| | | * @throws Exception 加密过程中的异常信息 |
| | | */ |
| | | public static String encrypt(String str, String publicKey) throws Exception { |
| | | if (StringUtil.isBlank(str)) { |
| | | return ""; |
| | | } |
| | | // base64编码的公钥 |
| | | byte[] decoded = Base64.decodeBase64(publicKey); |
| | | RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA") |
| | | .generatePublic(new X509EncodedKeySpec(decoded)); |
| | | // RSA加密 |
| | | Cipher cipher = Cipher.getInstance("RSA"); |
| | | cipher.init(Cipher.ENCRYPT_MODE, pubKey); |
| | | String outStr = Base64.encodeBase64String(cipher.doFinal(str.getBytes("UTF-8"))); |
| | | return outStr; |
| | | } |
| | | |
| | | /** |
| | | * RSA私钥解密 |
| | | * |
| | | * @param str 加密字符串 |
| | | * @param privateKey 私钥 |
| | | * @return 铭文 |
| | | * @throws Exception 解密过程中的异常信息 |
| | | */ |
| | | public static String decrypt(String str, String privateKey) throws Exception { |
| | | // 64位解码加密后的字符串 |
| | | byte[] inputByte = Base64.decodeBase64(str.getBytes("UTF-8")); |
| | | // base64编码的私钥 |
| | | byte[] decoded = Base64.decodeBase64(privateKey); |
| | | RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA") |
| | | .generatePrivate(new PKCS8EncodedKeySpec(decoded)); |
| | | // RSA解密 |
| | | Cipher cipher = Cipher.getInstance("RSA"); |
| | | cipher.init(Cipher.DECRYPT_MODE, priKey); |
| | | String outStr = new String(cipher.doFinal(inputByte)); |
| | | return outStr; |
| | | } |
| | | |
| | | /** |
| | | * RSA私钥解密 |
| | | * |
| | | * @param str 加密字符串 |
| | | * @param privateKey 私钥 |
| | | * @return 铭文 |
| | | * @throws Exception 解密过程中的异常信息 |
| | | */ |
| | | public static String decrypt2(String str, String privateKey) throws Exception { |
| | | str = str.replace(" ", "+"); |
| | | // 64位解码加密后的字符串 |
| | | byte[] inputByte = Base64.decodeBase64(str.getBytes("UTF-8")); |
| | | // base64编码的私钥 |
| | | byte[] decoded = Base64.decodeBase64(privateKey); |
| | | RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA") |
| | | .generatePrivate(new PKCS8EncodedKeySpec(decoded)); |
| | | // RSA解密 |
| | | Cipher cipher = Cipher.getInstance("RSA"); |
| | | cipher.init(Cipher.DECRYPT_MODE, priKey); |
| | | String outStr = new String(cipher.doFinal(inputByte)); |
| | | return outStr; |
| | | } |
| | | |
| | | public static String rsaEncrypt(String input, String rsaPublicKey) { |
| | | String result = ""; |
| | | try { |
| | | // 将Base64编码后的公钥转换成PublicKey对象 |
| | | byte[] buffer = Base64.decodeBase64(rsaPublicKey); |
| | | KeyFactory keyFactory = KeyFactory.getInstance("RSA"); |
| | | X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer); |
| | | PublicKey publicKey = keyFactory.generatePublic(keySpec); |
| | | // 加密 |
| | | Cipher cipher = Cipher.getInstance("RSA"); |
| | | cipher.init(Cipher.ENCRYPT_MODE, publicKey);// ubli |
| | | byte[] inputArray = input.getBytes(); |
| | | int inputLength = inputArray.length; |
| | | // System.out.println("加密字节数:" + inputLength); |
| | | // 最大加密字节数,超出最大字节数需要分组加密 |
| | | int MAX_ENCRYPT_BLOCK = 117; |
| | | // 标识 |
| | | int offSet = 0; |
| | | byte[] resultBytes = {}; |
| | | byte[] cache = {}; |
| | | while (inputLength - offSet > 0) { |
| | | if (inputLength - offSet > MAX_ENCRYPT_BLOCK) { |
| | | cache = cipher.doFinal(inputArray, offSet, MAX_ENCRYPT_BLOCK); |
| | | offSet += MAX_ENCRYPT_BLOCK; |
| | | } else { |
| | | cache = cipher.doFinal(inputArray, offSet, inputLength - offSet); |
| | | offSet = inputLength; |
| | | } |
| | | resultBytes = Arrays.copyOf(resultBytes, resultBytes.length + cache.length); |
| | | System.arraycopy(cache, 0, resultBytes, resultBytes.length - cache.length, cache.length); |
| | | } |
| | | result = Base64.encodeBase64String(resultBytes); |
| | | } catch (Exception e) { |
| | | System.out.println("rsaEncrypt error:" + e.getMessage()); |
| | | } |
| | | // System.out.println("加密的结果:" + result); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @GetMapping("/appletsList") |
| | | public R appletList(){ |
| | | return R.ok(commediateTypeService.list(new QueryWrapper<ComMediateType>().eq("enabled",1))); |
| | | return R.ok(commediateTypeService.list(new QueryWrapper<ComMediateType>().eq("enabled",1).eq("delete_flag", 0))); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增事件类型 |
| | | * */ |
| | |
| | | return comEventTransferRecordService.pageByComEventTransferRecord(comEventTransferRecord, pagination); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * description 根据ID删除三说会堂事件流转表 |
| | | * |
| | |
| | | * @return 处理结果 |
| | | * */ |
| | | IPage<ComMediateType> eventList(Page page, @Param("keyWord") String keyWord); |
| | | |
| | | /** |
| | | * 查询该事件类型的事件数量 |
| | | * */ |
| | | Integer selectEventCount(Long id); |
| | | } |
| | | |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer eventCount; |
| | | |
| | | // @Override |
| | | // public boolean equals(Object that) { |
| | | // if (this == that) { |
| | |
| | | List<ComEventResource> resourceList = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent1.getId())); |
| | | List<ComEventRequestImageVO> comEventRequestImageVO = CopyUtil.deepCopyListObject(resourceList, ComEventRequestImageVO.class); |
| | | comEvent1.setImages(comEventRequestImageVO); |
| | | comEvent1.setIcon(userService.getUserInfoByUserId(comEvent1.getRequestUserId().toString()).getData().getImageUrl()); |
| | | // if (nonNull(userService.getUserInfoByUserId(comEvent1.getRequestUserId().toString()).getData().getImageUrl())){ |
| | | // comEvent1.setIcon(userService.getUserInfoByUserId(comEvent1.getRequestUserId().toString()).getData().getImageUrl()); |
| | | // } |
| | | ComMediateType category = commediateTypeService.getById(comEvent1.getEventCategory()); |
| | | comEvent1.setEventCategoryName(category.getName()); |
| | | }); |
| | |
| | | } |
| | | } |
| | | } |
| | | if (loginUserInfo.getAccount().equals("admin") || loginUserInfo.getAccount().equals("xiqu")){ |
| | | id=null; |
| | | range=null; |
| | | } |
| | | return R.ok(comSanshuoExpertDao.expertPage(new Page(page,size),keyWord,range,id)); |
| | | } |
| | | |
| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComMediateTypeDTO; |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | |
| | | * */ |
| | | @Override |
| | | public R listEvent(String keyWord, Integer page, Integer size) { |
| | | return R.ok(comMediateTypeDao.eventList(new Page(page,size),keyWord)); |
| | | IPage<ComMediateType> comMediateTypeIPage = comMediateTypeDao.eventList(new Page(page, size), keyWord); |
| | | List<ComMediateType> records = comMediateTypeIPage.getRecords(); |
| | | for (ComMediateType record : records) { |
| | | //查询事件数量 |
| | | if (nonNull(record) && nonNull(record.getId())){ |
| | | record.setEventCount(comMediateTypeDao.selectEventCount(record.getId())); |
| | | } |
| | | } |
| | | comMediateTypeIPage.setRecords(records); |
| | | return R.ok(comMediateTypeIPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | BeanUtil.copyProperties(comMediateTypeDTO,mediateType); |
| | | mediateType.setId(Snowflake.getId()); |
| | | mediateType.setCreateDate(new Date()); |
| | | mediateType.setEnabled(true); |
| | | mediateType.setDeleteFlag(false); |
| | | return R.ok(comMediateTypeDao.insert(mediateType)); |
| | | } |
| | | |
| | |
| | | and name like concat('%',#{keyWord},'%') |
| | | </if> |
| | | </select> |
| | | <select id="selectEventCount" resultType="java.lang.Integer"> |
| | | select count(id) from com_sanshuo_event_info |
| | | where event_category = #{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.utlis.RSAUtils; |
| | | import com.panzhihua.service_property.entity.ComPropertyRepair; |
| | | import com.panzhihua.service_property.service.ComPropertyRepairService; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | return this.comPropertyRepairService.pageList(commonPage); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | |
| | | if(comPropertyRepairVO!=null){ |
| | | BeanUtils.copyProperties(comPropertyRepairVO,comPropertyRepair); |
| | | } |
| | | ComPropertyRepairVO vo=comPropertyRepairVO; |
| | | try { |
| | | comPropertyRepairVO.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); |
| | | comPropertyRepairVO.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | comPropertyRepairVO.setRepairName(vo.getRepairName()); |
| | | comPropertyRepairVO.setRepairPhone(vo.getRepairPhone()); |
| | | } |
| | | return R.ok(this.comPropertyRepairService.save(comPropertyRepair)); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.utlis.RSAUtils; |
| | | import com.panzhihua.service_property.entity.ComPropertyRepair; |
| | | import com.panzhihua.service_property.dao.ComPropertyRepairDao; |
| | | import com.panzhihua.service_property.service.ComPropertyRepairService; |
| | |
| | | private ComPropertyRepairDao comPropertyRepairDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | // try { |
| | | // commonPage.setUsername(RSAUtils.decrypt(commonPage.getUsername(), Constants.PRIVATE_KEY)); |
| | | // commonPage.setPhone(RSAUtils.decrypt(commonPage.getPhone(), Constants.PRIVATE_KEY)); |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | IPage<ComPropertyRepairVO> list=comPropertyRepairDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage); |
| | | return R.ok(list); |
| | | } |