From eaf7871b100878f8faaa88d1cab1e7f4085ac55d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 4 Jun 2024 18:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/BsAgentController.java | 14 +- .../controller/BsGasOilGunNoController.java | 13 +- .../controller/BsGasOilPriceController.java | 4 +- .../BsGasOilPriceTaskController.java | 8 +- .../bweb/controller/BsGasStaffController.java | 284 ++++ .../bweb/controller/BsMerchantController.java | 3 +- .../BsMerchantPayConfigController.java | 21 +- cweb/src/main/java/com/CWebApplication.java | 8 +- .../main/java/com/cweb/config/AuthConfig.java | 1 + .../com/cweb/controller/BsGasController.java | 79 ++ cweb/src/main/resources/dev/application.yml | 28 +- .../hfkj/msg/RedisKeyExpirationListener.java | 2 +- .../java/com/hfkj/dao/BsGasStaffMapper.java | 133 ++ .../com/hfkj/dao/BsGasStaffMapperExt.java | 7 + .../com/hfkj/dao/BsGasStaffSqlProvider.java | 360 ++++++ .../com/hfkj/dao/BsMerchantMapperExt.java | 38 +- .../hfkj/dao/BsMerchantPayConfigMapper.java | 15 +- .../dao/BsMerchantPayConfigSqlProvider.java | 28 + .../main/java/com/hfkj/entity/BsGasStaff.java | 264 ++++ .../com/hfkj/entity/BsGasStaffExample.java | 1143 +++++++++++++++++ .../com/hfkj/entity/BsMerchantPayConfig.java | 32 + .../entity/BsMerchantPayConfigExample.java | 130 ++ .../java/com/hfkj/model/GasListModel.java | 59 + .../main/java/com/hfkj/model/GasModel.java | 22 + .../java/com/hfkj/model/GasOilPriceModel.java | 23 + .../java/com/hfkj/model/GasPayPriceModel.java | 84 ++ .../{ => gas}/BsGasOilGunNoService.java | 2 +- .../BsGasOilPriceOfficialService.java | 2 +- .../{ => gas}/BsGasOilPriceService.java | 9 +- .../{ => gas}/BsGasOilPriceTaskService.java | 2 +- .../com/hfkj/service/gas/BsGasService.java | 54 + .../hfkj/service/gas/BsGasStaffService.java | 51 + .../impl/BsGasOilGunNoServiceImpl.java | 4 +- .../BsGasOilPriceOfficialServiceImpl.java | 6 +- .../impl/BsGasOilPriceServiceImpl.java | 17 +- .../impl/BsGasOilPriceTaskServiceImpl.java} | 16 +- .../service/gas/impl/BsGasServiceImpl.java | 180 +++ .../gas/impl/BsGasStaffServiceImpl.java | 150 +++ .../hfkj/service/impl/BsAgentServiceImpl.java | 10 +- .../service/impl/BsMerchantServiceImpl.java | 10 - .../hfkj/sysenum/SecUserObjectTypeEnum.java | 14 +- .../{ => gas}/GasOilPriceStatusEnum.java | 2 +- .../GasOilPriceTaskExecutionTypeEnum.java | 2 +- .../com/hfkj/sysenum/gas/GasStaffStatus.java | 36 + .../{ => gas}/GasTaskExecutionTypeEnum.java | 2 +- .../{ => gas}/GasTaskPriceTypeEnum.java | 2 +- .../sysenum/{ => gas}/GasTaskStatusEnum.java | 2 +- 47 files changed, 3293 insertions(+), 83 deletions(-) create mode 100644 bweb/src/main/java/com/bweb/controller/BsGasStaffController.java create mode 100644 cweb/src/main/java/com/cweb/controller/BsGasController.java create mode 100644 service/src/main/java/com/hfkj/dao/BsGasStaffMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsGasStaffMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsGasStaffSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsGasStaff.java create mode 100644 service/src/main/java/com/hfkj/entity/BsGasStaffExample.java create mode 100644 service/src/main/java/com/hfkj/model/GasListModel.java create mode 100644 service/src/main/java/com/hfkj/model/GasModel.java create mode 100644 service/src/main/java/com/hfkj/model/GasOilPriceModel.java create mode 100644 service/src/main/java/com/hfkj/model/GasPayPriceModel.java rename service/src/main/java/com/hfkj/service/{ => gas}/BsGasOilGunNoService.java (96%) rename service/src/main/java/com/hfkj/service/{ => gas}/BsGasOilPriceOfficialService.java (96%) rename service/src/main/java/com/hfkj/service/{ => gas}/BsGasOilPriceService.java (87%) rename service/src/main/java/com/hfkj/service/{ => gas}/BsGasOilPriceTaskService.java (97%) create mode 100644 service/src/main/java/com/hfkj/service/gas/BsGasService.java create mode 100644 service/src/main/java/com/hfkj/service/gas/BsGasStaffService.java rename service/src/main/java/com/hfkj/service/{ => gas}/impl/BsGasOilGunNoServiceImpl.java (97%) rename service/src/main/java/com/hfkj/service/{ => gas}/impl/BsGasOilPriceOfficialServiceImpl.java (97%) rename service/src/main/java/com/hfkj/service/{ => gas}/impl/BsGasOilPriceServiceImpl.java (86%) rename service/src/main/java/com/hfkj/service/{impl/HighGasOilPriceTaskServiceImpl.java => gas/impl/BsGasOilPriceTaskServiceImpl.java} (95%) create mode 100644 service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/service/gas/impl/BsGasStaffServiceImpl.java rename service/src/main/java/com/hfkj/sysenum/{ => gas}/GasOilPriceStatusEnum.java (96%) rename service/src/main/java/com/hfkj/sysenum/{ => gas}/GasOilPriceTaskExecutionTypeEnum.java (97%) create mode 100644 service/src/main/java/com/hfkj/sysenum/gas/GasStaffStatus.java rename service/src/main/java/com/hfkj/sysenum/{ => gas}/GasTaskExecutionTypeEnum.java (95%) rename service/src/main/java/com/hfkj/sysenum/{ => gas}/GasTaskPriceTypeEnum.java (95%) rename service/src/main/java/com/hfkj/sysenum/{ => gas}/GasTaskStatusEnum.java (95%) diff --git a/bweb/src/main/java/com/bweb/controller/BsAgentController.java b/bweb/src/main/java/com/bweb/controller/BsAgentController.java index b357cc9..828714d 100644 --- a/bweb/src/main/java/com/bweb/controller/BsAgentController.java +++ b/bweb/src/main/java/com/bweb/controller/BsAgentController.java @@ -6,12 +6,10 @@ import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; -import com.hfkj.common.security.UserCenter; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsAgent; import com.hfkj.entity.SecUser; import com.hfkj.model.ResponseData; -import com.hfkj.model.SecUserSessionObject; import com.hfkj.service.BsAgentService; import com.hfkj.service.sec.SecUserService; import com.hfkj.sysenum.SecUserObjectTypeEnum; @@ -26,7 +24,6 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.HashMap; import java.util.Map; -import java.util.Objects; @Controller @RequestMapping(value = "/agent") @@ -39,8 +36,6 @@ public class BsAgentController { private BsAgentService agentService; @Resource private SecUserService secUserService; - @Resource - private UserCenter userCenter; @RequestMapping(value = "/createAgent", method = RequestMethod.POST) @ResponseBody @@ -118,14 +113,13 @@ public class BsAgentController { Map param = new HashMap<>(); param.put("agent", agent); - /* SecUser secUser = secUserService.getDetail(SecUserObjectTypeEnum.type2.getNumber(), agent.getId()); + SecUser secUser = secUserService.getDetail(SecUserObjectTypeEnum.type4, agent.getId()); if (secUser == null) { log.error("BsAgentController --> queryAgentDetail() error!", "未找到代理商登录账户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到代理商登录账户"); } secUser.setPassword(null); - param.put("account", secUser);*/ - param.put("account", null); + param.put("account", secUser); return ResponseMsgUtil.success(param); } catch (Exception e) { @@ -137,14 +131,12 @@ public class BsAgentController { @RequestMapping(value = "/queryAgentList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询代理商列表") - public ResponseData queryAgentList(@RequestParam(name = "companyId", required = false) Long companyId, - @RequestParam(name = "agentNo", required = false) String agentNo, + public ResponseData queryAgentList(@RequestParam(name = "agentNo", required = false) String agentNo, @RequestParam(name = "agentName", required = false) String agentName, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { Map param = new HashMap<>(); - param.put("companyId", companyId); param.put("agentNo", agentNo); param.put("agentName", agentName); diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOilGunNoController.java b/bweb/src/main/java/com/bweb/controller/BsGasOilGunNoController.java index 9418851..87796d8 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOilGunNoController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOilGunNoController.java @@ -1,8 +1,6 @@ package com.bweb.controller; import com.alibaba.fastjson.JSONObject; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; @@ -11,15 +9,11 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilPrice; import com.hfkj.entity.BsMerchant; -import com.hfkj.entity.SecDictionary; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; -import com.hfkj.service.BsGasOilGunNoService; -import com.hfkj.service.BsGasOilPriceService; +import com.hfkj.service.gas.BsGasOilGunNoService; +import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.BsMerchantService; -import com.hfkj.service.CommonService; -import com.hfkj.sysenum.GasOilPriceStatusEnum; -import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -29,10 +23,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.math.BigDecimal; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; @Controller diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java index 991f663..6e35de7 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java @@ -11,10 +11,10 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.*; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; -import com.hfkj.service.BsGasOilPriceService; +import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.BsMerchantService; import com.hfkj.service.CommonService; -import com.hfkj.sysenum.GasOilPriceStatusEnum; +import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java index b61e67a..3225769 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java @@ -14,12 +14,11 @@ import com.hfkj.entity.SecDictionary; import com.hfkj.entity.SecRegion; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; -import com.hfkj.service.BsAgentService; -import com.hfkj.service.BsGasOilPriceTaskService; +import com.hfkj.service.gas.BsGasOilPriceTaskService; import com.hfkj.service.BsMerchantService; import com.hfkj.service.CommonService; -import com.hfkj.sysenum.GasOilPriceTaskExecutionTypeEnum; -import com.hfkj.sysenum.GasTaskPriceTypeEnum; +import com.hfkj.sysenum.gas.GasOilPriceTaskExecutionTypeEnum; +import com.hfkj.sysenum.gas.GasTaskPriceTypeEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -30,7 +29,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java b/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java new file mode 100644 index 0000000..62b31e4 --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java @@ -0,0 +1,284 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.bweb.config.SysConst; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.QRCodeGenerator; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.AESEncodeUtil; +import com.hfkj.common.security.SessionObject; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.DateUtil; +import com.hfkj.common.utils.IDGenerator; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.config.CommonSysConst; +import com.hfkj.entity.BsGasStaff; +import com.hfkj.entity.BsMerchant; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.BsMerchantService; +import com.hfkj.service.CommonService; +import com.hfkj.service.gas.BsGasStaffService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import com.hfkj.sysenum.gas.GasStaffStatus; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.net.URLEncoder; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/gasStaff") +@Api(value = "加油站员工管理") +public class BsGasStaffController { + + private static Logger log = LoggerFactory.getLogger(BsGasStaffController.class); + + @Resource + private BsGasStaffService gasStaffService; + @Resource + private BsMerchantService merchantService; + @Resource + private CommonService commonService; + @Resource + private UserCenter userCenter; + + @RequestMapping(value="/addGasStaff",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "增加员工") + public ResponseData addStaff(@RequestBody JSONObject body) { + try { + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } + if (!userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + if (StringUtils.isBlank(body.getString("name")) + || StringUtils.isBlank(body.getString("telephone")) + || StringUtils.isBlank(body.getString("positionType"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + BsGasStaff gasStaff = new BsGasStaff(); + gasStaff.setMerId(userInfoModel.getAccount().getObjectId()); + gasStaff.setAvatar(body.getString("avatar")); + gasStaff.setName(body.getString("name")); + gasStaff.setTelephone(body.getString("telephone")); + gasStaff.setPositionType(body.getInteger("positionType")); + gasStaff.setPositionName(commonService.getDictionaryCodeName("GAS_STAFF_POSITION_TYPE", body.getString("positionType"))); + gasStaffService.addStaff(gasStaff); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasStaffController -> addStaff() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/updateGasStaff",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "修改员工") + public ResponseData updateGasStaff(@RequestBody JSONObject body) { + try { + if (body.getLong("id") == null + || StringUtils.isBlank(body.getString("name")) + || StringUtils.isBlank(body.getString("telephone")) + || StringUtils.isBlank(body.getString("positionType")) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 查询员工信息 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(body.getLong("id")); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工信息"); + } + gasStaff.setAvatar(body.getString("avatar")); + gasStaff.setName(body.getString("name")); + gasStaff.setTelephone(body.getString("telephone")); + gasStaff.setPositionType(body.getInteger("positionType")); + gasStaff.setPositionName(commonService.getDictionaryCodeName("GAS_STAFF_POSITION_TYPE", body.getString("positionType"))); + gasStaffService.updateStaff(gasStaff); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasStaffController -> updateGasStaff() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryQrCode",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "查询二维码") + public ResponseData queryQrCode(@RequestBody JSONObject body) { + try { + if (body.getLong("gasStaffId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 查询员工信息 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(body.getLong("gasStaffId")); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工信息"); + } + + if (StringUtils.isBlank(gasStaff.getQrCodeImgUrl())) { + // 查询加油站 + BsMerchant merchantStore = merchantService.getMerchant(gasStaff.getMerId()); + if (merchantStore == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到加油站信息"); + } + // 员工ID签名 + String signId = AESEncodeUtil.aesEncrypt(gasStaff.getId().toString()); + + // 生成二维码 + String param = "/hsgH5?accountId=0000021"; + String qrCodeImgUrl = DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(1) +".jpg"; + QRCodeGenerator.generateQRCodeImage(param, 350, 350, SysConst.getSysConfig().getFileUrl()+"/gasStaff/"+qrCodeImgUrl); + + gasStaff.setQrCodeImgUrl(qrCodeImgUrl); + gasStaffService.updateStaff(gasStaff); + } + + return ResponseMsgUtil.success(gasStaff.getQrCodeImgUrl()); + + } catch (Exception e) { + log.error("HighGasStaffController -> queryQrCode() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/disabled",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "禁用员工") + public ResponseData disabled(@RequestBody JSONObject body) { + try { + if (body.getLong("staffId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 查询油站员工 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(body.getLong("staffId")); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工"); + } + gasStaff.setStatus(GasStaffStatus.status2.getStatus()); + gasStaffService.editData(gasStaff); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasStaffController -> disabled() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/recover",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "恢复正常") + public ResponseData recover(@RequestBody JSONObject body) { + try { + if (body.getLong("staffId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 查询油站员工 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(body.getLong("staffId")); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工"); + } + gasStaff.setStatus(GasStaffStatus.status1.getStatus()); + gasStaffService.editData(gasStaff); + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasStaffController -> delStaff() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/delStaff",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "删除员工") + public ResponseData delStaff(@RequestBody JSONObject body) { + try { + + if (body.getLong("staffId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasStaffService.delStaff(body.getLong("staffId")); + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasStaffController -> delStaff() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/getStaffDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询员工详情") + public ResponseData getStaffDetail(@RequestParam(name = "staffId", required = true) Long staffId) { + try { + + return ResponseMsgUtil.success(gasStaffService.getStaffDetailById(staffId)); + + } catch (Exception e) { + log.error("HighGasStaffController -> getStaffDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value="/getStaffList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询员工列表") + public ResponseData getStaffList(@RequestParam(name = "merchantStoreId", required = false) Long merchantStoreId, + @RequestParam(name = "name", required = false) String name, + @RequestParam(name = "telephone", required = false) String telephone, + @RequestParam(name = "positionType", required = false) Integer positionType, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } + Map param = new HashMap<>(); + if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { + param.put("merchantStoreId", merchantStoreId); + } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + param.put("merchantStoreId", userInfoModel.getAccount().getObjectId()); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + param.put("name", name); + param.put("telephone", telephone); + param.put("positionType", positionType); + param.put("status", status); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(gasStaffService.getStaffList(param))); + + } catch (Exception e) { + log.error("HighGasStaffController -> getStaffList() error!",e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java index 9ebb6b9..b784f1f 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java @@ -11,8 +11,9 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.*; import com.hfkj.model.ResponseData; import com.hfkj.service.*; +import com.hfkj.service.gas.BsGasOilGunNoService; +import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.sysenum.MerchantStatusEnum; -import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantPayConfigController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantPayConfigController.java index 194950c..dbe580d 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantPayConfigController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantPayConfigController.java @@ -1,5 +1,7 @@ package com.bweb.controller; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; @@ -44,7 +46,9 @@ public class BsMerchantPayConfigController { if (body == null || body.getMerNo() == null || StringUtils.isBlank(body.getChannelMerNo()) - || StringUtils.isBlank(body.getChannelMerKey())) { + || StringUtils.isBlank(body.getChannelMerKey()) + || body.getLedgerAccountFlag() == null + ) { log.error("BsMerchantPayConfigController --> editConfig() error!", "参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } @@ -59,6 +63,20 @@ public class BsMerchantPayConfigController { if (config == null) { config = new BsMerchantPayConfig(); } + if(body.getLedgerAccountFlag().equals(true)) { + if (StringUtils.isBlank(body.getLedgerAccountData())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + JSONArray ledgerAccountArray = JSONArray.parseArray(body.getLedgerAccountData()); + for (Object obj : ledgerAccountArray) { + JSONObject ledgerAccount = (JSONObject) obj; + if (StringUtils.isBlank(ledgerAccount.getString("receiverMerNo")) + || ledgerAccount.getBigDecimal("receiverRatio") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + } + config.setLedgerAccountData(body.getLedgerAccountData()); + } config.setMerId(merchant.getId()); config.setMerNo(merchant.getMerNo()); config.setMerName(merchant.getMerName()); @@ -66,6 +84,7 @@ public class BsMerchantPayConfigController { config.setChannelCode("HUI_PAY"); config.setChannelMerNo(body.getChannelMerNo()); config.setChannelMerKey(body.getChannelMerKey()); + config.setLedgerAccountFlag(body.getLedgerAccountFlag()); merchantPayConfigService.editData(config); return ResponseMsgUtil.success("操作成功"); diff --git a/cweb/src/main/java/com/CWebApplication.java b/cweb/src/main/java/com/CWebApplication.java index de6b8a0..4014bc4 100644 --- a/cweb/src/main/java/com/CWebApplication.java +++ b/cweb/src/main/java/com/CWebApplication.java @@ -1,19 +1,25 @@ package com; +import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation; +import com.alicp.jetcache.anno.config.EnableMethodCache; import com.hfkj.common.utils.SpringContextUtil; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @SpringBootApplication -//@ComponentScan +// @ComponentScan @EnableTransactionManagement @EnableScheduling +@EnableMethodCache(basePackages = "com.hfkj") +@EnableCreateCacheAnnotation @ServletComponentScan +@EnableAspectJAutoProxy(proxyTargetClass = true) @MapperScan("com.hfkj.dao") public class CWebApplication { diff --git a/cweb/src/main/java/com/cweb/config/AuthConfig.java b/cweb/src/main/java/com/cweb/config/AuthConfig.java index 5441d5d..5486764 100644 --- a/cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -87,6 +87,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/client/*") .excludePathPatterns("/sms/*") + .excludePathPatterns("/gas/*") .excludePathPatterns("/secUser/login") .excludePathPatterns("/secUser/loginOut") ; diff --git a/cweb/src/main/java/com/cweb/controller/BsGasController.java b/cweb/src/main/java/com/cweb/controller/BsGasController.java new file mode 100644 index 0000000..8799791 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/BsGasController.java @@ -0,0 +1,79 @@ +package com.cweb.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.service.gas.BsGasService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.math.BigDecimal; + +@Controller +@RequestMapping(value = "/gas") +@Api(value = "油站管理") +public class BsGasController { + private static Logger log = LoggerFactory.getLogger(BsGasController.class); + + @Resource + private BsGasService gasService; + + @RequestMapping(value="/oilPriceCompute",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "油价计算") + public ResponseData oilPriceCompute(@RequestParam(name = "isTyAgent", required = false) Boolean isTyAgent, + @RequestParam(name = "refuelPrice", required = true) BigDecimal refuelPrice, + @RequestParam(name = "merNo", required = true) String merNo, + @RequestParam(name = "oilNo", required = true) String oilNo) { + try { + + return ResponseMsgUtil.success(gasService.refuelPriceCompute(refuelPrice,merNo,oilNo,isTyAgent)); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryGasList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询加油站列表") + public ResponseData queryGasList(@RequestParam(name = "isTyAgent", required = false) Boolean isTyAgent, + @RequestParam(name = "gasName", required = false) String gasName, + @RequestParam(name = "distanceLimit", required = false) Integer distanceLimit, + @RequestParam(name = "oilNo", required = true) String oilNo, + @RequestParam(name = "longitude", required = true) String longitude, + @RequestParam(name = "latitude", required = true) String latitude, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize + ) { + try { + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(gasService.getGasList(longitude,latitude,oilNo,gasName,distanceLimit))); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryGasDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询加油站详情") + public ResponseData queryGasDetail(@RequestParam(name = "merNo", required = true) String merNo, + @RequestParam(name = "isTyAgent", required = false) Boolean isTyAgent) { + try { + + return ResponseMsgUtil.success(gasService.getGasDetail(merNo)); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/resources/dev/application.yml b/cweb/src/main/resources/dev/application.yml index ac95283..cceea06 100644 --- a/cweb/src/main/resources/dev/application.yml +++ b/cweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hai_oil?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -43,6 +43,30 @@ spring: jackson: serialization: write-dates-as-timestamps: true + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 139.9.154.68 + port: 36379 + password: HF123456.Redis + database: 0 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + mybatis: mapperLocations: - classpath*:sqlmap*/*.xml diff --git a/schedule/src/main/java/com/hfkj/msg/RedisKeyExpirationListener.java b/schedule/src/main/java/com/hfkj/msg/RedisKeyExpirationListener.java index 5132e41..1443f21 100644 --- a/schedule/src/main/java/com/hfkj/msg/RedisKeyExpirationListener.java +++ b/schedule/src/main/java/com/hfkj/msg/RedisKeyExpirationListener.java @@ -1,7 +1,7 @@ package com.hfkj.msg; import com.hfkj.entity.BsGasOilPriceTask; -import com.hfkj.service.BsGasOilPriceTaskService; +import com.hfkj.service.gas.BsGasOilPriceTaskService; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/service/src/main/java/com/hfkj/dao/BsGasStaffMapper.java b/service/src/main/java/com/hfkj/dao/BsGasStaffMapper.java new file mode 100644 index 0000000..7b248c9 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasStaffMapper.java @@ -0,0 +1,133 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasStaff; +import com.hfkj.entity.BsGasStaffExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface BsGasStaffMapper extends BsGasStaffMapperExt { + @SelectProvider(type=BsGasStaffSqlProvider.class, method="countByExample") + long countByExample(BsGasStaffExample example); + + @DeleteProvider(type=BsGasStaffSqlProvider.class, method="deleteByExample") + int deleteByExample(BsGasStaffExample example); + + @Delete({ + "delete from bs_gas_staff", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_gas_staff (mer_id, avatar, ", + "`name`, telephone, ", + "position_type, position_name, ", + "qr_code_img_url, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{avatar,jdbcType=VARCHAR}, ", + "#{name,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, ", + "#{positionType,jdbcType=INTEGER}, #{positionName,jdbcType=VARCHAR}, ", + "#{qrCodeImgUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsGasStaff record); + + @InsertProvider(type=BsGasStaffSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsGasStaff record); + + @SelectProvider(type=BsGasStaffSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="position_type", property="positionType", jdbcType=JdbcType.INTEGER), + @Result(column="position_name", property="positionName", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_img_url", property="qrCodeImgUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsGasStaffExample example); + + @Select({ + "select", + "id, mer_id, avatar, `name`, telephone, position_type, position_name, qr_code_img_url, ", + "`status`, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_gas_staff", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="position_type", property="positionType", jdbcType=JdbcType.INTEGER), + @Result(column="position_name", property="positionName", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_img_url", property="qrCodeImgUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsGasStaff selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsGasStaffSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsGasStaff record, @Param("example") BsGasStaffExample example); + + @UpdateProvider(type=BsGasStaffSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsGasStaff record, @Param("example") BsGasStaffExample example); + + @UpdateProvider(type=BsGasStaffSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsGasStaff record); + + @Update({ + "update bs_gas_staff", + "set mer_id = #{merId,jdbcType=BIGINT},", + "avatar = #{avatar,jdbcType=VARCHAR},", + "`name` = #{name,jdbcType=VARCHAR},", + "telephone = #{telephone,jdbcType=VARCHAR},", + "position_type = #{positionType,jdbcType=INTEGER},", + "position_name = #{positionName,jdbcType=VARCHAR},", + "qr_code_img_url = #{qrCodeImgUrl,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsGasStaff record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasStaffMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasStaffMapperExt.java new file mode 100644 index 0000000..44e104e --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasStaffMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsGasStaffMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasStaffSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasStaffSqlProvider.java new file mode 100644 index 0000000..db27a9d --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasStaffSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasStaff; +import com.hfkj.entity.BsGasStaffExample.Criteria; +import com.hfkj.entity.BsGasStaffExample.Criterion; +import com.hfkj.entity.BsGasStaffExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsGasStaffSqlProvider { + + public String countByExample(BsGasStaffExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_gas_staff"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsGasStaffExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_gas_staff"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsGasStaff record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_gas_staff"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getAvatar() != null) { + sql.VALUES("avatar", "#{avatar,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); + } + + if (record.getTelephone() != null) { + sql.VALUES("telephone", "#{telephone,jdbcType=VARCHAR}"); + } + + if (record.getPositionType() != null) { + sql.VALUES("position_type", "#{positionType,jdbcType=INTEGER}"); + } + + if (record.getPositionName() != null) { + sql.VALUES("position_name", "#{positionName,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeImgUrl() != null) { + sql.VALUES("qr_code_img_url", "#{qrCodeImgUrl,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsGasStaffExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("avatar"); + sql.SELECT("`name`"); + sql.SELECT("telephone"); + sql.SELECT("position_type"); + sql.SELECT("position_name"); + sql.SELECT("qr_code_img_url"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_gas_staff"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsGasStaff record = (BsGasStaff) parameter.get("record"); + BsGasStaffExample example = (BsGasStaffExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_gas_staff"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getAvatar() != null) { + sql.SET("avatar = #{record.avatar,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + } + + if (record.getTelephone() != null) { + sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); + } + + if (record.getPositionType() != null) { + sql.SET("position_type = #{record.positionType,jdbcType=INTEGER}"); + } + + if (record.getPositionName() != null) { + sql.SET("position_name = #{record.positionName,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeImgUrl() != null) { + sql.SET("qr_code_img_url = #{record.qrCodeImgUrl,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_staff"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("avatar = #{record.avatar,jdbcType=VARCHAR}"); + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); + sql.SET("position_type = #{record.positionType,jdbcType=INTEGER}"); + sql.SET("position_name = #{record.positionName,jdbcType=VARCHAR}"); + sql.SET("qr_code_img_url = #{record.qrCodeImgUrl,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsGasStaffExample example = (BsGasStaffExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsGasStaff record) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_staff"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getAvatar() != null) { + sql.SET("avatar = #{avatar,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getTelephone() != null) { + sql.SET("telephone = #{telephone,jdbcType=VARCHAR}"); + } + + if (record.getPositionType() != null) { + sql.SET("position_type = #{positionType,jdbcType=INTEGER}"); + } + + if (record.getPositionName() != null) { + sql.SET("position_name = #{positionName,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeImgUrl() != null) { + sql.SET("qr_code_img_url = #{qrCodeImgUrl,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsGasStaffExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java index ea7ad61..2feadbf 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java +++ b/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java @@ -1,7 +1,43 @@ package com.hfkj.dao; +import com.hfkj.model.GasListModel; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + /** * mapper扩展类 */ public interface BsMerchantMapperExt { -} \ No newline at end of file + + @Select("") + List queryGasList(@Param("longitude") String longitude, + @Param("latitude") String latitude, + @Param("oilNo") String oilNo, + @Param("gasName") String gasName, + @Param("distanceLimit") Integer distanceLimit); +} diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigMapper.java b/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigMapper.java index 279ff79..7120019 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigMapper.java @@ -42,13 +42,15 @@ public interface BsMerchantPayConfigMapper extends BsMerchantPayConfigMapperExt "insert into bs_merchant_pay_config (mer_id, mer_no, ", "mer_name, channel_code, ", "channel_name, channel_mer_no, ", - "channel_mer_key, create_time, ", + "channel_mer_key, ledger_account_flag, ", + "ledger_account_data, create_time, ", "update_time, `status`, ", "ext_1, ext_2, ext_3)", "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ", "#{merName,jdbcType=VARCHAR}, #{channelCode,jdbcType=VARCHAR}, ", "#{channelName,jdbcType=VARCHAR}, #{channelMerNo,jdbcType=VARCHAR}, ", - "#{channelMerKey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{channelMerKey,jdbcType=VARCHAR}, #{ledgerAccountFlag,jdbcType=BIT}, ", + "#{ledgerAccountData,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -69,6 +71,8 @@ public interface BsMerchantPayConfigMapper extends BsMerchantPayConfigMapperExt @Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR), @Result(column="channel_mer_no", property="channelMerNo", jdbcType=JdbcType.VARCHAR), @Result(column="channel_mer_key", property="channelMerKey", jdbcType=JdbcType.VARCHAR), + @Result(column="ledger_account_flag", property="ledgerAccountFlag", jdbcType=JdbcType.BIT), + @Result(column="ledger_account_data", property="ledgerAccountData", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -81,7 +85,8 @@ public interface BsMerchantPayConfigMapper extends BsMerchantPayConfigMapperExt @Select({ "select", "id, mer_id, mer_no, mer_name, channel_code, channel_name, channel_mer_no, channel_mer_key, ", - "create_time, update_time, `status`, ext_1, ext_2, ext_3", + "ledger_account_flag, ledger_account_data, create_time, update_time, `status`, ", + "ext_1, ext_2, ext_3", "from bs_merchant_pay_config", "where id = #{id,jdbcType=BIGINT}" }) @@ -94,6 +99,8 @@ public interface BsMerchantPayConfigMapper extends BsMerchantPayConfigMapperExt @Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR), @Result(column="channel_mer_no", property="channelMerNo", jdbcType=JdbcType.VARCHAR), @Result(column="channel_mer_key", property="channelMerKey", jdbcType=JdbcType.VARCHAR), + @Result(column="ledger_account_flag", property="ledgerAccountFlag", jdbcType=JdbcType.BIT), + @Result(column="ledger_account_data", property="ledgerAccountData", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -121,6 +128,8 @@ public interface BsMerchantPayConfigMapper extends BsMerchantPayConfigMapperExt "channel_name = #{channelName,jdbcType=VARCHAR},", "channel_mer_no = #{channelMerNo,jdbcType=VARCHAR},", "channel_mer_key = #{channelMerKey,jdbcType=VARCHAR},", + "ledger_account_flag = #{ledgerAccountFlag,jdbcType=BIT},", + "ledger_account_data = #{ledgerAccountData,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigSqlProvider.java index 0658989..831e71d 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsMerchantPayConfigSqlProvider.java @@ -56,6 +56,14 @@ public class BsMerchantPayConfigSqlProvider { sql.VALUES("channel_mer_key", "#{channelMerKey,jdbcType=VARCHAR}"); } + if (record.getLedgerAccountFlag() != null) { + sql.VALUES("ledger_account_flag", "#{ledgerAccountFlag,jdbcType=BIT}"); + } + + if (record.getLedgerAccountData() != null) { + sql.VALUES("ledger_account_data", "#{ledgerAccountData,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -97,6 +105,8 @@ public class BsMerchantPayConfigSqlProvider { sql.SELECT("channel_name"); sql.SELECT("channel_mer_no"); sql.SELECT("channel_mer_key"); + sql.SELECT("ledger_account_flag"); + sql.SELECT("ledger_account_data"); sql.SELECT("create_time"); sql.SELECT("update_time"); sql.SELECT("`status`"); @@ -152,6 +162,14 @@ public class BsMerchantPayConfigSqlProvider { sql.SET("channel_mer_key = #{record.channelMerKey,jdbcType=VARCHAR}"); } + if (record.getLedgerAccountFlag() != null) { + sql.SET("ledger_account_flag = #{record.ledgerAccountFlag,jdbcType=BIT}"); + } + + if (record.getLedgerAccountData() != null) { + sql.SET("ledger_account_data = #{record.ledgerAccountData,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -192,6 +210,8 @@ public class BsMerchantPayConfigSqlProvider { sql.SET("channel_name = #{record.channelName,jdbcType=VARCHAR}"); sql.SET("channel_mer_no = #{record.channelMerNo,jdbcType=VARCHAR}"); sql.SET("channel_mer_key = #{record.channelMerKey,jdbcType=VARCHAR}"); + sql.SET("ledger_account_flag = #{record.ledgerAccountFlag,jdbcType=BIT}"); + sql.SET("ledger_account_data = #{record.ledgerAccountData,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -236,6 +256,14 @@ public class BsMerchantPayConfigSqlProvider { sql.SET("channel_mer_key = #{channelMerKey,jdbcType=VARCHAR}"); } + if (record.getLedgerAccountFlag() != null) { + sql.SET("ledger_account_flag = #{ledgerAccountFlag,jdbcType=BIT}"); + } + + if (record.getLedgerAccountData() != null) { + sql.SET("ledger_account_data = #{ledgerAccountData,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsGasStaff.java b/service/src/main/java/com/hfkj/entity/BsGasStaff.java new file mode 100644 index 0000000..41ad6bf --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasStaff.java @@ -0,0 +1,264 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_gas_staff + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsGasStaff implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 商户id + */ + private Long merId; + + /** + * 员工头像 + */ + private String avatar; + + /** + * 员工名称 + */ + private String name; + + /** + * 员工电话 + */ + private String telephone; + + /** + * 职位类型 1:加油员 + */ + private Integer positionType; + + /** + * 职位类型名称 + */ + private String positionName; + + /** + * 二维码图片地址 + */ + private String qrCodeImgUrl; + + /** + * 状态 0:删除 1:正常 2:禁用 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public Integer getPositionType() { + return positionType; + } + + public void setPositionType(Integer positionType) { + this.positionType = positionType; + } + + public String getPositionName() { + return positionName; + } + + public void setPositionName(String positionName) { + this.positionName = positionName; + } + + public String getQrCodeImgUrl() { + return qrCodeImgUrl; + } + + public void setQrCodeImgUrl(String qrCodeImgUrl) { + this.qrCodeImgUrl = qrCodeImgUrl; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsGasStaff other = (BsGasStaff) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone())) + && (this.getPositionType() == null ? other.getPositionType() == null : this.getPositionType().equals(other.getPositionType())) + && (this.getPositionName() == null ? other.getPositionName() == null : this.getPositionName().equals(other.getPositionName())) + && (this.getQrCodeImgUrl() == null ? other.getQrCodeImgUrl() == null : this.getQrCodeImgUrl().equals(other.getQrCodeImgUrl())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode()); + result = prime * result + ((getPositionType() == null) ? 0 : getPositionType().hashCode()); + result = prime * result + ((getPositionName() == null) ? 0 : getPositionName().hashCode()); + result = prime * result + ((getQrCodeImgUrl() == null) ? 0 : getQrCodeImgUrl().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", merId=").append(merId); + sb.append(", avatar=").append(avatar); + sb.append(", name=").append(name); + sb.append(", telephone=").append(telephone); + sb.append(", positionType=").append(positionType); + sb.append(", positionName=").append(positionName); + sb.append(", qrCodeImgUrl=").append(qrCodeImgUrl); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasStaffExample.java b/service/src/main/java/com/hfkj/entity/BsGasStaffExample.java new file mode 100644 index 0000000..4572271 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasStaffExample.java @@ -0,0 +1,1143 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsGasStaffExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsGasStaffExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andAvatarIsNull() { + addCriterion("avatar is null"); + return (Criteria) this; + } + + public Criteria andAvatarIsNotNull() { + addCriterion("avatar is not null"); + return (Criteria) this; + } + + public Criteria andAvatarEqualTo(String value) { + addCriterion("avatar =", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarNotEqualTo(String value) { + addCriterion("avatar <>", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarGreaterThan(String value) { + addCriterion("avatar >", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarGreaterThanOrEqualTo(String value) { + addCriterion("avatar >=", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarLessThan(String value) { + addCriterion("avatar <", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarLessThanOrEqualTo(String value) { + addCriterion("avatar <=", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarLike(String value) { + addCriterion("avatar like", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarNotLike(String value) { + addCriterion("avatar not like", value, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarIn(List values) { + addCriterion("avatar in", values, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarNotIn(List values) { + addCriterion("avatar not in", values, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarBetween(String value1, String value2) { + addCriterion("avatar between", value1, value2, "avatar"); + return (Criteria) this; + } + + public Criteria andAvatarNotBetween(String value1, String value2) { + addCriterion("avatar not between", value1, value2, "avatar"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTelephoneIsNull() { + addCriterion("telephone is null"); + return (Criteria) this; + } + + public Criteria andTelephoneIsNotNull() { + addCriterion("telephone is not null"); + return (Criteria) this; + } + + public Criteria andTelephoneEqualTo(String value) { + addCriterion("telephone =", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotEqualTo(String value) { + addCriterion("telephone <>", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneGreaterThan(String value) { + addCriterion("telephone >", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneGreaterThanOrEqualTo(String value) { + addCriterion("telephone >=", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLessThan(String value) { + addCriterion("telephone <", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLessThanOrEqualTo(String value) { + addCriterion("telephone <=", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLike(String value) { + addCriterion("telephone like", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotLike(String value) { + addCriterion("telephone not like", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneIn(List values) { + addCriterion("telephone in", values, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotIn(List values) { + addCriterion("telephone not in", values, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneBetween(String value1, String value2) { + addCriterion("telephone between", value1, value2, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotBetween(String value1, String value2) { + addCriterion("telephone not between", value1, value2, "telephone"); + return (Criteria) this; + } + + public Criteria andPositionTypeIsNull() { + addCriterion("position_type is null"); + return (Criteria) this; + } + + public Criteria andPositionTypeIsNotNull() { + addCriterion("position_type is not null"); + return (Criteria) this; + } + + public Criteria andPositionTypeEqualTo(Integer value) { + addCriterion("position_type =", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeNotEqualTo(Integer value) { + addCriterion("position_type <>", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeGreaterThan(Integer value) { + addCriterion("position_type >", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("position_type >=", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeLessThan(Integer value) { + addCriterion("position_type <", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeLessThanOrEqualTo(Integer value) { + addCriterion("position_type <=", value, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeIn(List values) { + addCriterion("position_type in", values, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeNotIn(List values) { + addCriterion("position_type not in", values, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeBetween(Integer value1, Integer value2) { + addCriterion("position_type between", value1, value2, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionTypeNotBetween(Integer value1, Integer value2) { + addCriterion("position_type not between", value1, value2, "positionType"); + return (Criteria) this; + } + + public Criteria andPositionNameIsNull() { + addCriterion("position_name is null"); + return (Criteria) this; + } + + public Criteria andPositionNameIsNotNull() { + addCriterion("position_name is not null"); + return (Criteria) this; + } + + public Criteria andPositionNameEqualTo(String value) { + addCriterion("position_name =", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameNotEqualTo(String value) { + addCriterion("position_name <>", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameGreaterThan(String value) { + addCriterion("position_name >", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameGreaterThanOrEqualTo(String value) { + addCriterion("position_name >=", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameLessThan(String value) { + addCriterion("position_name <", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameLessThanOrEqualTo(String value) { + addCriterion("position_name <=", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameLike(String value) { + addCriterion("position_name like", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameNotLike(String value) { + addCriterion("position_name not like", value, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameIn(List values) { + addCriterion("position_name in", values, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameNotIn(List values) { + addCriterion("position_name not in", values, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameBetween(String value1, String value2) { + addCriterion("position_name between", value1, value2, "positionName"); + return (Criteria) this; + } + + public Criteria andPositionNameNotBetween(String value1, String value2) { + addCriterion("position_name not between", value1, value2, "positionName"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlIsNull() { + addCriterion("qr_code_img_url is null"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlIsNotNull() { + addCriterion("qr_code_img_url is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlEqualTo(String value) { + addCriterion("qr_code_img_url =", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlNotEqualTo(String value) { + addCriterion("qr_code_img_url <>", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlGreaterThan(String value) { + addCriterion("qr_code_img_url >", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlGreaterThanOrEqualTo(String value) { + addCriterion("qr_code_img_url >=", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlLessThan(String value) { + addCriterion("qr_code_img_url <", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlLessThanOrEqualTo(String value) { + addCriterion("qr_code_img_url <=", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlLike(String value) { + addCriterion("qr_code_img_url like", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlNotLike(String value) { + addCriterion("qr_code_img_url not like", value, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlIn(List values) { + addCriterion("qr_code_img_url in", values, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlNotIn(List values) { + addCriterion("qr_code_img_url not in", values, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlBetween(String value1, String value2) { + addCriterion("qr_code_img_url between", value1, value2, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeImgUrlNotBetween(String value1, String value2) { + addCriterion("qr_code_img_url not between", value1, value2, "qrCodeImgUrl"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMerchantPayConfig.java b/service/src/main/java/com/hfkj/entity/BsMerchantPayConfig.java index c9a7f53..ee7e9a1 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerchantPayConfig.java +++ b/service/src/main/java/com/hfkj/entity/BsMerchantPayConfig.java @@ -50,6 +50,16 @@ public class BsMerchantPayConfig implements Serializable { */ private String channelMerKey; + /** + * 是否分账 0:否 :是 + */ + private Boolean ledgerAccountFlag; + + /** + * 分账接收方数据 + */ + private String ledgerAccountData; + /** * 创建时间 */ @@ -137,6 +147,22 @@ public class BsMerchantPayConfig implements Serializable { this.channelMerKey = channelMerKey; } + public Boolean getLedgerAccountFlag() { + return ledgerAccountFlag; + } + + public void setLedgerAccountFlag(Boolean ledgerAccountFlag) { + this.ledgerAccountFlag = ledgerAccountFlag; + } + + public String getLedgerAccountData() { + return ledgerAccountData; + } + + public void setLedgerAccountData(String ledgerAccountData) { + this.ledgerAccountData = ledgerAccountData; + } + public Date getCreateTime() { return createTime; } @@ -205,6 +231,8 @@ public class BsMerchantPayConfig implements Serializable { && (this.getChannelName() == null ? other.getChannelName() == null : this.getChannelName().equals(other.getChannelName())) && (this.getChannelMerNo() == null ? other.getChannelMerNo() == null : this.getChannelMerNo().equals(other.getChannelMerNo())) && (this.getChannelMerKey() == null ? other.getChannelMerKey() == null : this.getChannelMerKey().equals(other.getChannelMerKey())) + && (this.getLedgerAccountFlag() == null ? other.getLedgerAccountFlag() == null : this.getLedgerAccountFlag().equals(other.getLedgerAccountFlag())) + && (this.getLedgerAccountData() == null ? other.getLedgerAccountData() == null : this.getLedgerAccountData().equals(other.getLedgerAccountData())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -225,6 +253,8 @@ public class BsMerchantPayConfig implements Serializable { result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode()); result = prime * result + ((getChannelMerNo() == null) ? 0 : getChannelMerNo().hashCode()); result = prime * result + ((getChannelMerKey() == null) ? 0 : getChannelMerKey().hashCode()); + result = prime * result + ((getLedgerAccountFlag() == null) ? 0 : getLedgerAccountFlag().hashCode()); + result = prime * result + ((getLedgerAccountData() == null) ? 0 : getLedgerAccountData().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -248,6 +278,8 @@ public class BsMerchantPayConfig implements Serializable { sb.append(", channelName=").append(channelName); sb.append(", channelMerNo=").append(channelMerNo); sb.append(", channelMerKey=").append(channelMerKey); + sb.append(", ledgerAccountFlag=").append(ledgerAccountFlag); + sb.append(", ledgerAccountData=").append(ledgerAccountData); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", status=").append(status); diff --git a/service/src/main/java/com/hfkj/entity/BsMerchantPayConfigExample.java b/service/src/main/java/com/hfkj/entity/BsMerchantPayConfigExample.java index a08a339..a30ef01 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerchantPayConfigExample.java +++ b/service/src/main/java/com/hfkj/entity/BsMerchantPayConfigExample.java @@ -665,6 +665,136 @@ public class BsMerchantPayConfigExample { return (Criteria) this; } + public Criteria andLedgerAccountFlagIsNull() { + addCriterion("ledger_account_flag is null"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagIsNotNull() { + addCriterion("ledger_account_flag is not null"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagEqualTo(Boolean value) { + addCriterion("ledger_account_flag =", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagNotEqualTo(Boolean value) { + addCriterion("ledger_account_flag <>", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagGreaterThan(Boolean value) { + addCriterion("ledger_account_flag >", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagGreaterThanOrEqualTo(Boolean value) { + addCriterion("ledger_account_flag >=", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagLessThan(Boolean value) { + addCriterion("ledger_account_flag <", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagLessThanOrEqualTo(Boolean value) { + addCriterion("ledger_account_flag <=", value, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagIn(List values) { + addCriterion("ledger_account_flag in", values, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagNotIn(List values) { + addCriterion("ledger_account_flag not in", values, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagBetween(Boolean value1, Boolean value2) { + addCriterion("ledger_account_flag between", value1, value2, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountFlagNotBetween(Boolean value1, Boolean value2) { + addCriterion("ledger_account_flag not between", value1, value2, "ledgerAccountFlag"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataIsNull() { + addCriterion("ledger_account_data is null"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataIsNotNull() { + addCriterion("ledger_account_data is not null"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataEqualTo(String value) { + addCriterion("ledger_account_data =", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataNotEqualTo(String value) { + addCriterion("ledger_account_data <>", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataGreaterThan(String value) { + addCriterion("ledger_account_data >", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataGreaterThanOrEqualTo(String value) { + addCriterion("ledger_account_data >=", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataLessThan(String value) { + addCriterion("ledger_account_data <", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataLessThanOrEqualTo(String value) { + addCriterion("ledger_account_data <=", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataLike(String value) { + addCriterion("ledger_account_data like", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataNotLike(String value) { + addCriterion("ledger_account_data not like", value, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataIn(List values) { + addCriterion("ledger_account_data in", values, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataNotIn(List values) { + addCriterion("ledger_account_data not in", values, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataBetween(String value1, String value2) { + addCriterion("ledger_account_data between", value1, value2, "ledgerAccountData"); + return (Criteria) this; + } + + public Criteria andLedgerAccountDataNotBetween(String value1, String value2) { + addCriterion("ledger_account_data not between", value1, value2, "ledgerAccountData"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/model/GasListModel.java b/service/src/main/java/com/hfkj/model/GasListModel.java new file mode 100644 index 0000000..19e237b --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasListModel.java @@ -0,0 +1,59 @@ +package com.hfkj.model; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 油站列表模型 + * @className: GasListModel + * @author: HuRui + * @date: 2024/6/4 + **/ +@Data +public class GasListModel { + /** + * 商户号 + */ + private String merNo; + /** + * 商户名称 + */ + private String merName; + /** + * 商户地址 + */ + private String address; + /** + * 商户经度 + */ + private String longitude; + /** + * 商户纬度 + */ + private String latitude; + /** + * 距离 + */ + private String distance; + /** + * 油品 + */ + private String oilNo; + /** + * 国标价 + */ + private BigDecimal priceOfficial; + /** + * 枪价 + */ + private BigDecimal priceGun; + /** + * VIP价 + */ + private BigDecimal priceVip; + /** + * 油站直降 + */ + private BigDecimal gasStationDrop; +} diff --git a/service/src/main/java/com/hfkj/model/GasModel.java b/service/src/main/java/com/hfkj/model/GasModel.java new file mode 100644 index 0000000..aae8260 --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasModel.java @@ -0,0 +1,22 @@ +package com.hfkj.model; + +import com.hfkj.entity.BsMerchant; +import lombok.Data; + +import java.util.List; + +/** + * 油站信息模型 + * @className: GasModel + * @author: HuRui + * @date: 2024/6/4 + **/ +@Data +public class GasModel extends BsMerchant { + + /** + * 油站油品 + */ + private List gasOilPrice; + +} diff --git a/service/src/main/java/com/hfkj/model/GasOilPriceModel.java b/service/src/main/java/com/hfkj/model/GasOilPriceModel.java new file mode 100644 index 0000000..c5f8adc --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasOilPriceModel.java @@ -0,0 +1,23 @@ +package com.hfkj.model; + +import com.hfkj.entity.BsGasOilGunNo; +import com.hfkj.entity.BsGasOilPrice; +import lombok.Data; + +import java.util.List; + +/** + * 油站油品 + * @className: GasOilPriceModel + * @author: HuRui + * @date: 2024/6/4 + **/ +@Data +public class GasOilPriceModel extends BsGasOilPrice { + + /** + * 油站抢号 + */ + public List gasOilGunNo; + +} diff --git a/service/src/main/java/com/hfkj/model/GasPayPriceModel.java b/service/src/main/java/com/hfkj/model/GasPayPriceModel.java new file mode 100644 index 0000000..c9ba573 --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasPayPriceModel.java @@ -0,0 +1,84 @@ +package com.hfkj.model; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 团购支付价格模型 + * @author hurui + */ +@Data +public class GasPayPriceModel { + + /** + * 加油金额 + */ + private BigDecimal oilingPrice; + + /** + * 优惠价 + */ + private BigDecimal priceVip; + + /** + * 枪价 + */ + private BigDecimal priceGun; + + /** + * 成本价 + */ + private BigDecimal priceCost; + + /** + * 国标价 + */ + private BigDecimal priceOfficial; + + /** + * 平台价 + */ + private BigDecimal pricePlatform; + + /** + * 油站直降 + */ + private BigDecimal gasStationDrop; + + /** + * 平台补贴 + */ + private BigDecimal preferentialMargin; + + /** + * 加油升数,计算方式:加油金额 / 国标价 + */ + private BigDecimal oilLiters; + + /** + * 平台折扣,我们平台或者代理商设置的折扣 + */ + private BigDecimal discount; + + /** + * 每升优惠 + */ + private BigDecimal litersPreferences; + + /** + * 优惠价格 + */ + private BigDecimal pricePreferences; + + /** + * 本次优惠 + */ + private BigDecimal totalPreferences; + + /** + * 支付价格,计算方式:加油金额 - 本次优惠 + */ + private BigDecimal payPrice; + +} diff --git a/service/src/main/java/com/hfkj/service/BsGasOilGunNoService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java similarity index 96% rename from service/src/main/java/com/hfkj/service/BsGasOilGunNoService.java rename to service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java index 881e927..39a71ed 100644 --- a/service/src/main/java/com/hfkj/service/BsGasOilGunNoService.java +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java @@ -1,4 +1,4 @@ -package com.hfkj.service; +package com.hfkj.service.gas; import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilPrice; diff --git a/service/src/main/java/com/hfkj/service/BsGasOilPriceOfficialService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceOfficialService.java similarity index 96% rename from service/src/main/java/com/hfkj/service/BsGasOilPriceOfficialService.java rename to service/src/main/java/com/hfkj/service/gas/BsGasOilPriceOfficialService.java index 1b02435..ef9edb6 100644 --- a/service/src/main/java/com/hfkj/service/BsGasOilPriceOfficialService.java +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceOfficialService.java @@ -1,4 +1,4 @@ -package com.hfkj.service; +package com.hfkj.service.gas; import com.hfkj.entity.BsGasOilPriceOfficial; diff --git a/service/src/main/java/com/hfkj/service/BsGasOilPriceService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceService.java similarity index 87% rename from service/src/main/java/com/hfkj/service/BsGasOilPriceService.java rename to service/src/main/java/com/hfkj/service/gas/BsGasOilPriceService.java index 1b4a8ac..efaf58e 100644 --- a/service/src/main/java/com/hfkj/service/BsGasOilPriceService.java +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceService.java @@ -1,4 +1,4 @@ -package com.hfkj.service; +package com.hfkj.service.gas; import com.hfkj.entity.BsGasOilPrice; @@ -45,6 +45,13 @@ public interface BsGasOilPriceService { */ BsGasOilPrice getGasOilPrice(Long merId,String oilNo); + /** + * 查询油价列表 + * @param merId + * @return + */ + List getGasOilPriceList(Long merId); + /** * 查询油价列表 * @param param diff --git a/service/src/main/java/com/hfkj/service/BsGasOilPriceTaskService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceTaskService.java similarity index 97% rename from service/src/main/java/com/hfkj/service/BsGasOilPriceTaskService.java rename to service/src/main/java/com/hfkj/service/gas/BsGasOilPriceTaskService.java index e85daec..6fca10d 100644 --- a/service/src/main/java/com/hfkj/service/BsGasOilPriceTaskService.java +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOilPriceTaskService.java @@ -1,4 +1,4 @@ -package com.hfkj.service; +package com.hfkj.service.gas; import com.hfkj.entity.BsGasOilPriceTask; diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasService.java b/service/src/main/java/com/hfkj/service/gas/BsGasService.java new file mode 100644 index 0000000..a8461db --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasService.java @@ -0,0 +1,54 @@ +package com.hfkj.service.gas; + +import com.hfkj.model.GasListModel; +import com.hfkj.model.GasModel; +import com.hfkj.model.GasPayPriceModel; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * @className: BsGasService + * @author: HuRui + * @date: 2024/6/4 + **/ +public interface BsGasService { + + /** + * 更新缓存 + * @param data + */ + void cache(GasModel data); + + /** + * 清除缓存 + * @param merNo + */ + void clean(String merNo); + + /** + * 加油计算 + * @param refuelPrice + * @param merNo + * @param oilNo + * @param isTyAgent + * @return + * @throws Exception + */ + GasPayPriceModel refuelPriceCompute(BigDecimal refuelPrice, String merNo, String oilNo, Boolean isTyAgent) ; + + /** + * 查询油站信息 + * @param merNo 商户号 + * @return + */ + GasModel getGasDetail(String merNo); + + /** + * 查询油站列表 + * @param + * @return + */ + List getGasList(String longitude,String latitude,String oilNo,String gasName,Integer distanceLimit); +} diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasStaffService.java b/service/src/main/java/com/hfkj/service/gas/BsGasStaffService.java new file mode 100644 index 0000000..252d3ab --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasStaffService.java @@ -0,0 +1,51 @@ +package com.hfkj.service.gas; + +import com.hfkj.entity.BsGasStaff; + +import java.util.List; +import java.util.Map; + +/** + * 加油站员工 + * @author hurui + */ +public interface BsGasStaffService { + + /** + * 编辑员工数据 + * @param gasStaff + */ + void editData(BsGasStaff gasStaff); + + /** + * 增加员工 + * @param gasStaff + */ + void addStaff(BsGasStaff gasStaff) throws Exception; + + /** + * 修改员工 + * @param gasStaff + */ + void updateStaff(BsGasStaff gasStaff); + + /** + * 删除员工 + * @param id + */ + void delStaff(Long id); + + /** + * 根据id查询 + * @param id + * @return + */ + BsGasStaff getStaffDetailById(Long id); + + /** + * 查询员工列表 + * @param param + * @return + */ + List getStaffList(Map param); +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsGasOilGunNoServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java similarity index 97% rename from service/src/main/java/com/hfkj/service/impl/BsGasOilGunNoServiceImpl.java rename to service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java index 77b1bf3..f3a5f7e 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsGasOilGunNoServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java @@ -1,4 +1,4 @@ -package com.hfkj.service.impl; +package com.hfkj.service.gas.impl; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; @@ -7,7 +7,7 @@ import com.hfkj.common.utils.RedisUtil; import com.hfkj.dao.BsGasOilGunNoMapper; import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilGunNoExample; -import com.hfkj.service.BsGasOilGunNoService; +import com.hfkj.service.gas.BsGasOilGunNoService; import org.springframework.stereotype.Service; import javax.annotation.Resource; diff --git a/service/src/main/java/com/hfkj/service/impl/BsGasOilPriceOfficialServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java similarity index 97% rename from service/src/main/java/com/hfkj/service/impl/BsGasOilPriceOfficialServiceImpl.java rename to service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java index 4979fa8..d0ac99c 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsGasOilPriceOfficialServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java @@ -1,12 +1,12 @@ -package com.hfkj.service.impl; +package com.hfkj.service.gas.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.hfkj.common.utils.HttpsUtils; import com.hfkj.dao.BsGasOilPriceOfficialMapper; import com.hfkj.entity.*; -import com.hfkj.service.BsGasOilPriceOfficialService; -import com.hfkj.service.BsGasOilPriceService; +import com.hfkj.service.gas.BsGasOilPriceOfficialService; +import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.CommonService; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; diff --git a/service/src/main/java/com/hfkj/service/impl/BsGasOilPriceServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceServiceImpl.java similarity index 86% rename from service/src/main/java/com/hfkj/service/impl/BsGasOilPriceServiceImpl.java rename to service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceServiceImpl.java index bdf65f2..77e9ced 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsGasOilPriceServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceServiceImpl.java @@ -1,12 +1,12 @@ -package com.hfkj.service.impl; +package com.hfkj.service.gas.impl; import com.hfkj.common.utils.RedisUtil; import com.hfkj.dao.BsGasOilPriceMapper; import com.hfkj.entity.BsGasOilPrice; import com.hfkj.entity.BsGasOilPriceExample; -import com.hfkj.service.BsGasOilGunNoService; -import com.hfkj.service.BsGasOilPriceService; -import com.hfkj.sysenum.GasOilPriceStatusEnum; +import com.hfkj.service.gas.BsGasOilGunNoService; +import com.hfkj.service.gas.BsGasOilPriceService; +import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -84,6 +84,15 @@ public class BsGasOilPriceServiceImpl implements BsGasOilPriceService { return null; } + @Override + public List getGasOilPriceList(Long merId) { + BsGasOilPriceExample example = new BsGasOilPriceExample(); + example.createCriteria() + .andMerIdEqualTo(merId) + .andStatusNotEqualTo(GasOilPriceStatusEnum.status0.getNumber()); + return gasOilPriceMapper.selectByExample(example); + } + @Override public List getGasOilPriceList(Map param) { BsGasOilPriceExample example = new BsGasOilPriceExample(); diff --git a/service/src/main/java/com/hfkj/service/impl/HighGasOilPriceTaskServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceTaskServiceImpl.java similarity index 95% rename from service/src/main/java/com/hfkj/service/impl/HighGasOilPriceTaskServiceImpl.java rename to service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceTaskServiceImpl.java index 4bd0a9f..47162af 100644 --- a/service/src/main/java/com/hfkj/service/impl/HighGasOilPriceTaskServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceTaskServiceImpl.java @@ -1,4 +1,4 @@ -package com.hfkj.service.impl; +package com.hfkj.service.gas.impl; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; @@ -11,12 +11,12 @@ import com.hfkj.entity.BsGasOilPriceOfficial; import com.hfkj.entity.BsGasOilPriceTask; import com.hfkj.entity.BsGasOilPriceTaskExample; import com.hfkj.msg.MsgTopic; -import com.hfkj.service.BsGasOilPriceOfficialService; -import com.hfkj.service.BsGasOilPriceService; -import com.hfkj.service.BsGasOilPriceTaskService; -import com.hfkj.sysenum.GasTaskExecutionTypeEnum; -import com.hfkj.sysenum.GasTaskPriceTypeEnum; -import com.hfkj.sysenum.GasTaskStatusEnum; +import com.hfkj.service.gas.BsGasOilPriceOfficialService; +import com.hfkj.service.gas.BsGasOilPriceService; +import com.hfkj.service.gas.BsGasOilPriceTaskService; +import com.hfkj.sysenum.gas.GasTaskExecutionTypeEnum; +import com.hfkj.sysenum.gas.GasTaskPriceTypeEnum; +import com.hfkj.sysenum.gas.GasTaskStatusEnum; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -31,7 +31,7 @@ import java.util.Map; import java.util.stream.Collectors; @Service("gasOilPriceTaskService") -public class HighGasOilPriceTaskServiceImpl implements BsGasOilPriceTaskService { +public class BsGasOilPriceTaskServiceImpl implements BsGasOilPriceTaskService { @Resource private RedisUtil redisUtil; diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java new file mode 100644 index 0000000..542a0ed --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java @@ -0,0 +1,180 @@ +package com.hfkj.service.gas.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.RedisUtil; +import com.hfkj.dao.BsMerchantMapper; +import com.hfkj.entity.BsGasOilPrice; +import com.hfkj.entity.BsMerchant; +import com.hfkj.model.GasListModel; +import com.hfkj.model.GasModel; +import com.hfkj.model.GasOilPriceModel; +import com.hfkj.model.GasPayPriceModel; +import com.hfkj.service.gas.BsGasOilGunNoService; +import com.hfkj.service.gas.BsGasOilPriceService; +import com.hfkj.service.gas.BsGasService; +import com.hfkj.service.BsMerchantService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * @className: BsGasServiceImpl + * @author: HuRui + * @date: 2024/6/4 + **/ +@Service("gasService") +public class BsGasServiceImpl implements BsGasService { + @Resource + private BsMerchantMapper merchantMapper; + @Resource + private BsMerchantService merchantService; + @Resource + private BsGasOilPriceService gasOilPriceService; + @Resource + private BsGasOilGunNoService gasOilGunNoService; + @Resource + private RedisUtil redisUtil; + private final static String CACHE_GAS_KEY = "GAS:"; + + @Override + public void cache(GasModel data) { + redisUtil.set(CACHE_GAS_KEY + data.getMerNo(), data); + } + + @Override + public void clean(String merNo) { + redisUtil.del(CACHE_GAS_KEY+merNo); + } + + @Override + public GasPayPriceModel refuelPriceCompute(BigDecimal refuelPrice, String merNo, String oilNo, Boolean isTyAgent) { + // 查询油站信息 + BsMerchant merchant = merchantService.getMerchant(merNo); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站"); + } + + // 优惠比例 + BigDecimal discount = new BigDecimal("100"); + + if (isTyAgent != null && isTyAgent.equals(true)) { + + } + + discount = discount.divide(new BigDecimal("100")); + + // 查询油站价格 + BsGasOilPrice gasOilPrice = gasOilPriceService.getGasOilPrice(merchant.getId(), oilNo); + if (gasOilPrice == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站价格"); + } + // 国标价 + BigDecimal priceOfficial = gasOilPrice.getPriceOfficial(); + // 油站价 + BigDecimal priceGun = gasOilPrice.getPriceGun(); + // 油站直降 + BigDecimal gasStationDrop = gasOilPrice.getGasStationDrop(); + // 油站优惠价 + BigDecimal priceVip = gasOilPrice.getPriceVip(); + + GasPayPriceModel payPriceModel = new GasPayPriceModel(); + + // 嗨森逛平台价 油枪价 * 折扣 + BigDecimal pricePlatform = priceGun.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP); + + // 加油金额 + payPriceModel.setOilingPrice(refuelPrice); + + // 油站枪价 + payPriceModel.setPriceGun(priceGun); + + // 油站优惠价 + payPriceModel.setPriceVip(priceVip); + + // 油站国标价 + payPriceModel.setPriceOfficial(priceOfficial); + + // 油站直降 + payPriceModel.setGasStationDrop(gasStationDrop); + + // 平台补贴 + payPriceModel.setPreferentialMargin(gasOilPrice.getPreferentialMargin()); + + // 平台价 + payPriceModel.setPricePlatform(pricePlatform); + + // 加油升数,计算方式:加油金额 / 枪价 + payPriceModel.setOilLiters(refuelPrice.divide(priceGun, 2, BigDecimal.ROUND_HALF_DOWN)); + + // 平台折扣,我们平台或者代理商设置的折扣 + payPriceModel.setDiscount(discount.compareTo(new BigDecimal("1.00")) == 0 ? new BigDecimal("1.00") : discount); + + // 加油补贴, 计算方式:加油站枪价 - 加油站VIP价 + // payPriceModel.setOilSubsidy(priceGun.subtract(priceVip)); + + // 折扣,1 -平台折扣 + BigDecimal decimal1 = new BigDecimal("1").subtract(discount); + + // 油枪价 - 平台补贴 + // BigDecimal price = payPriceModel.getPriceGun().subtract(preferentialMargin); + + // 优惠价格 油站VIP价 * 系统折扣 + payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP)); + + // 每升优惠 油站价 - 优惠价格 + payPriceModel.setLitersPreferences(payPriceModel.getPriceGun().subtract(payPriceModel.getPricePreferences())); + + // 本次优惠 加油升数 * 每升优惠 + payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_HALF_UP)); + + // 支付价格 加油金额 - 本次优惠 + payPriceModel.setPayPrice(refuelPrice.subtract(payPriceModel.getTotalPreferences())); + + return payPriceModel; + } + + @Override + public GasModel getGasDetail(String merNo) { + // 缓存 + Object cacheObj = redisUtil.get(CACHE_GAS_KEY + merNo); + if (cacheObj != null) { + return (GasModel) cacheObj; + } + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(merNo); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站"); + } + GasModel gasModel = new GasModel(); + BeanUtils.copyProperties(merchant, gasModel); + + // 查询油品 + List oilNoList = gasOilPriceService.getGasOilPriceList(merchant.getId()); + + List oilNoModelList = new ArrayList<>(); + for (BsGasOilPrice gasOilPrice : oilNoList) { + GasOilPriceModel oilNo = new GasOilPriceModel(); + BeanUtils.copyProperties(gasOilPrice, oilNo); + // 查询抢号 + oilNo.setGasOilGunNo(gasOilGunNoService.getOilGunNoList(merNo)); + + oilNoModelList.add(oilNo); + } + gasModel.setGasOilPrice(oilNoModelList); + // 存入缓存 + cache(gasModel); + return gasModel; + } + + @Override + public List getGasList(String longitude, String latitude, String oilNo, String gasName, Integer distanceLimit) { + return merchantMapper.queryGasList(longitude,latitude,oilNo,gasName,distanceLimit); + } + +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasStaffServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasStaffServiceImpl.java new file mode 100644 index 0000000..827e24b --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasStaffServiceImpl.java @@ -0,0 +1,150 @@ +package com.hfkj.service.gas.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.MD5Util; +import com.hfkj.dao.BsGasStaffMapper; +import com.hfkj.entity.BsGasStaff; +import com.hfkj.entity.BsGasStaffExample; +import com.hfkj.entity.SecUser; +import com.hfkj.service.gas.BsGasStaffService; +import com.hfkj.service.sec.SecUserService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import com.hfkj.sysenum.gas.GasStaffStatus; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Service("gasStaffService") +public class BsGasStaffServiceImpl implements BsGasStaffService { + + @Resource + private BsGasStaffMapper gasStaffMapper; + + @Resource + private SecUserService userService; + + @Override + public void editData(BsGasStaff gasStaff) { + if (gasStaff.getId() == null) { + gasStaff.setCreateTime(new Date()); + gasStaff.setUpdateTime(new Date()); + gasStaff.setStatus(GasStaffStatus.status1.getStatus()); + gasStaffMapper.insert(gasStaff); + } else { + gasStaff.setUpdateTime(new Date()); + gasStaffMapper.updateByPrimaryKey(gasStaff); + } + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void addStaff(BsGasStaff gasStaff) throws Exception { + if (userService.getDetailByLoginName(gasStaff.getTelephone()) != null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "电话已存在,请更换"); + } + editData(gasStaff); + + SecUser secUser = new SecUser(); + secUser.setAvatar(gasStaff.getAvatar()); + secUser.setUserName(gasStaff.getName()); + secUser.setLoginName(gasStaff.getTelephone()); + secUser.setPassword(MD5Util.encode("123456".getBytes())); + secUser.setStatus(1); + secUser.setRoleId(4L); + secUser.setObjectType(SecUserObjectTypeEnum.type3.getCode()); + secUser.setObjectId(gasStaff.getId()); + secUser.setCreateTime(new Date()); + secUser.setUpdateTime(new Date()); + userService.editUser(secUser); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void updateStaff(BsGasStaff gasStaff) { + BsGasStaff detail = getStaffDetailById(gasStaff.getId()); + if (detail == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + if (!detail.getTelephone().equals(gasStaff.getTelephone())) { + if (userService.getDetailByLoginName(gasStaff.getTelephone()) != null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "电话已存在,请更换"); + } + } + + editData(gasStaff); + + // 查询账户 + SecUser account = userService.getDetail(SecUserObjectTypeEnum.type3, gasStaff.getId()); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户"); + } + account.setAvatar(gasStaff.getAvatar()); + account.setUserName(gasStaff.getName()); + account.setLoginName(gasStaff.getTelephone()); + account.setUpdateTime(new Date()); + userService.editUser(account); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void delStaff(Long id) { + BsGasStaff gasStaff = getStaffDetailById(id); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工"); + } + gasStaff.setStatus(GasStaffStatus.status0.getStatus()); + editData(gasStaff); + + // 查询账户 + SecUser account = userService.getDetail(SecUserObjectTypeEnum.type3, gasStaff.getId()); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户"); + } + account.setStatus(0); + userService.editUser(account); + } + + @Override + public BsGasStaff getStaffDetailById(Long id) { + return gasStaffMapper.selectByPrimaryKey(id); + } + + @Override + public List getStaffList(Map param) { + BsGasStaffExample example = new BsGasStaffExample(); + BsGasStaffExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "merchantStoreId") != null) { + criteria.andMerchantStoreIdEqualTo(MapUtils.getLong(param, "merchantStoreId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "name"))) { + criteria.andNameLike("%" + MapUtils.getString(param, "name") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "telephone"))) { + criteria.andTelephoneLike("%" + MapUtils.getString(param, "telephone") + "%"); + } + + if (MapUtils.getInteger(param, "positionType") != null) { + criteria.andPositionTypeEqualTo(MapUtils.getInteger(param, "positionType")); + } + + if (MapUtils.getInteger(param, "status") != null) { + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); + } + + example.setOrderByClause("create_time desc"); + return gasStaffMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java index db4b5c2..4581e5e 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java @@ -62,19 +62,17 @@ public class BsAgentServiceImpl implements BsAgentService { public BsAgent createAgent(String loginName, BsAgent agent) throws Exception { editData(agent); - /*SecUser secUser = new SecUser(); + SecUser secUser = new SecUser(); secUser.setUserName(agent.getName()); secUser.setLoginName(loginName); secUser.setPassword(MD5Util.encode("123456".getBytes())); - secUser.setAdminFlag(1); - secUser.setCompanyId(agent.getCompanyId()); - secUser.setRoleId(SecUserRoleIdEnum.roleId3.getRoleId()); - secUser.setObjectType(SecUserObjectTypeEnum.type3.getNumber()); + secUser.setRoleId(5L); + secUser.setObjectType(SecUserObjectTypeEnum.type4.getCode()); secUser.setObjectId(agent.getId()); secUser.setStatus(1); secUser.setCreateTime(new Date()); secUser.setUpdateTime(new Date()); - secUserService.editUser(secUser);*/ + secUserService.editUser(secUser); return agent; } diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java index aff1fe5..a3a7444 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java @@ -158,14 +158,4 @@ public class BsMerchantServiceImpl implements BsMerchantService { return merchantMapper.selectByExample(example); } - public static void main(String[] args) { - - Map param = new HashMap<>(); - param.put("merNoList", ""); - List merNoList = Arrays.stream(MapUtils.getString(param, "merNoList").split(",")).collect(Collectors.toList()); - for (String mer : merNoList) { - System.out.println(mer); - } - } - } diff --git a/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java index 70b811e..1309b96 100644 --- a/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java @@ -7,16 +7,26 @@ package com.hfkj.sysenum; * @date: 2024/4/23 **/ public enum SecUserObjectTypeEnum { - /** * 系统账户 */ type1(1, "系统账户"), - /** * 商户 */ type2(2, "商户"), + /** + * 商户员工 + */ + type3(3, "商户员工"), + /** + * 代理商 + */ + type4(4, "代理商"), + /** + * 业务员 + */ + type5(5, "业务员"), ; private int code; diff --git a/service/src/main/java/com/hfkj/sysenum/GasOilPriceStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceStatusEnum.java similarity index 96% rename from service/src/main/java/com/hfkj/sysenum/GasOilPriceStatusEnum.java rename to service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceStatusEnum.java index 79c9c5b..92a4711 100644 --- a/service/src/main/java/com/hfkj/sysenum/GasOilPriceStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceStatusEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.gas; import java.util.Objects; diff --git a/service/src/main/java/com/hfkj/sysenum/GasOilPriceTaskExecutionTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceTaskExecutionTypeEnum.java similarity index 97% rename from service/src/main/java/com/hfkj/sysenum/GasOilPriceTaskExecutionTypeEnum.java rename to service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceTaskExecutionTypeEnum.java index 187d916..3ea3e8f 100644 --- a/service/src/main/java/com/hfkj/sysenum/GasOilPriceTaskExecutionTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasOilPriceTaskExecutionTypeEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.gas; import java.util.Objects; diff --git a/service/src/main/java/com/hfkj/sysenum/gas/GasStaffStatus.java b/service/src/main/java/com/hfkj/sysenum/gas/GasStaffStatus.java new file mode 100644 index 0000000..a956bfc --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasStaffStatus.java @@ -0,0 +1,36 @@ +package com.hfkj.sysenum.gas; + +/** + * 加油站员工状态 + * @author hurui + */ +public enum GasStaffStatus { + status0(0 , "删除"), + status1(1 , "正常"), + status2(2 , "禁用"), + ; + + private Integer status; + private String name; + + GasStaffStatus(int status , String name) { + this.status = status; + this.name = name; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/service/src/main/java/com/hfkj/sysenum/GasTaskExecutionTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskExecutionTypeEnum.java similarity index 95% rename from service/src/main/java/com/hfkj/sysenum/GasTaskExecutionTypeEnum.java rename to service/src/main/java/com/hfkj/sysenum/gas/GasTaskExecutionTypeEnum.java index c15952c..26eae7c 100644 --- a/service/src/main/java/com/hfkj/sysenum/GasTaskExecutionTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskExecutionTypeEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.gas; /** * 加油站价格任务 diff --git a/service/src/main/java/com/hfkj/sysenum/GasTaskPriceTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskPriceTypeEnum.java similarity index 95% rename from service/src/main/java/com/hfkj/sysenum/GasTaskPriceTypeEnum.java rename to service/src/main/java/com/hfkj/sysenum/gas/GasTaskPriceTypeEnum.java index 2639ee8..1fa7e00 100644 --- a/service/src/main/java/com/hfkj/sysenum/GasTaskPriceTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskPriceTypeEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.gas; /** * 加油站价格任务 diff --git a/service/src/main/java/com/hfkj/sysenum/GasTaskStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskStatusEnum.java similarity index 95% rename from service/src/main/java/com/hfkj/sysenum/GasTaskStatusEnum.java rename to service/src/main/java/com/hfkj/sysenum/gas/GasTaskStatusEnum.java index efb223a..aa9f34f 100644 --- a/service/src/main/java/com/hfkj/sysenum/GasTaskStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasTaskStatusEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.gas; /** * 加油站价格任务