diff --git a/bweb/src/main/java/com/bweb/controller/BsAgentController.java b/bweb/src/main/java/com/bweb/controller/BsAgentController.java index 828714d..9d5940f 100644 --- a/bweb/src/main/java/com/bweb/controller/BsAgentController.java +++ b/bweb/src/main/java/com/bweb/controller/BsAgentController.java @@ -10,7 +10,7 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsAgent; import com.hfkj.entity.SecUser; import com.hfkj.model.ResponseData; -import com.hfkj.service.BsAgentService; +import com.hfkj.service.agent.BsAgentService; import com.hfkj.service.sec.SecUserService; import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; diff --git a/bweb/src/main/java/com/bweb/controller/BsAgentMerController.java b/bweb/src/main/java/com/bweb/controller/BsAgentMerController.java new file mode 100644 index 0000000..3161a5e --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsAgentMerController.java @@ -0,0 +1,208 @@ +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; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.agent.BsAgentMerService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +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.util.*; + +@Controller +@RequestMapping(value = "/agentMer") +@Api(value = "代理商商户") +public class BsAgentMerController { + + private static Logger log = LoggerFactory.getLogger(BsAgentMerController.class); + + @Resource + private BsAgentMerService agentMerService; + @Resource + private UserCenter userCenter; + @RequestMapping(value = "/assignAgent", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "分配代理商") + public ResponseData assignAgent(@RequestBody JSONObject body) { + try { + if (body.getLong("agentId") == null + || body.getJSONArray("merNoList") == null + || body.getJSONArray("merNoList").size() == 0 + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + List merNoList = new ArrayList<>(); + for (Object obj : body.getJSONArray("merNoList")) { + JSONObject objData = (JSONObject)obj; + if (StringUtils.isBlank(objData.getString("merNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + merNoList.add(objData.getString("merNo")); + } + agentMerService.assignAgent(body.getLong("agentId"), merNoList); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("BsAgentMerController --> assignAgent() error!", e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/unbindAgent", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "解绑代理商") + public ResponseData unbindAgent(@RequestBody JSONObject body) { + try { + if (body.getLong("agentId") == null + || body.getJSONArray("merNoList") == null + || body.getJSONArray("merNoList").isEmpty() + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + List merNoList = new ArrayList<>(); + for (Object obj : body.getJSONArray("merNoList")) { + JSONObject objData = (JSONObject)obj; + if (StringUtils.isBlank(objData.getString("merNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + merNoList.add(objData.getString("merNo")); + } + agentMerService.unbindAgent(body.getLong("agentId"), merNoList); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighTyAgentController --> assignOrg() error!", e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/assignStaff", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "分配工作人员") + public ResponseData assignStaff(@RequestBody JSONObject body) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (!userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + + if (body.getLong("staffId") == null + || body.getJSONArray("merNoList") == null + || body.getJSONArray("merNoList").isEmpty() + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + List merNoList = new ArrayList<>(); + for (Object obj : body.getJSONArray("merNoList")) { + JSONObject objData = (JSONObject)obj; + if (StringUtils.isBlank(objData.getString("merNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + merNoList.add(objData.getString("merNo")); + } + + agentMerService.assignStaff(body.getLong("staffId"), merNoList); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/unbindStaff", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "解绑业务员") + public ResponseData unbindStaff(@RequestBody JSONObject body) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (!userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + + if (body.getLong("staffId") == null + || body.getJSONArray("merNoList") == null + || body.getJSONArray("merNoList").isEmpty() + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + List merNoList = new ArrayList<>(); + for (Object obj : body.getJSONArray("merNoList")) { + JSONObject objData = (JSONObject)obj; + if (StringUtils.isBlank(objData.getString("merNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + merNoList.add(objData.getString("merNo")); + } + + agentMerService.unbindStaff(body.getLong("staffId"), merNoList); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/getAllotList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询分配列表") + public ResponseData getAllotList(@RequestParam(name = "agentId", required = false) Long agentId, + @RequestParam(name = "isAgentAllot", required = false) Boolean isAgentAllot, + @RequestParam(name = "agentStaffId", required = false) Long agentStaffId, + @RequestParam(name = "isAgentStaffAllot", required = false) Boolean isAgentStaffAllot, + @RequestParam(name = "provinceCode", required = false) String provinceCode, + @RequestParam(name = "merSourceType", required = false) Long merSourceType, + @RequestParam(name = "merNo", required = false) String merNo, + @RequestParam(name = "merName", required = false) String merName, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + Map param = new HashMap<>(); + param.put("provinceCode", provinceCode); + param.put("merSourceType", merSourceType); + param.put("merNo", merNo); + param.put("merName", merName); + + if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { + param.put("agentId", agentId); + param.put("isAgentAllot", isAgentAllot); + param.put("agentStaffId", agentStaffId); + param.put("isAgentStaffAllot", isAgentStaffAllot); + } else if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + param.put("agentId", userSession.getAccount().getObjectId()); + param.put("isAgentAllot", true); + param.put("agentStaffId", agentStaffId); + param.put("isAgentStaffAllot", isAgentStaffAllot); + } else if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) { + param.put("agentStaffId", userSession.getAccount().getObjectId()); + param.put("isAgentStaffAllot", true); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(agentMerService.getAllotList(param))); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } +} diff --git a/bweb/src/main/java/com/bweb/controller/BsAgentStaffController.java b/bweb/src/main/java/com/bweb/controller/BsAgentStaffController.java new file mode 100644 index 0000000..5a13f7b --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsAgentStaffController.java @@ -0,0 +1,184 @@ +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; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsAgentStaff; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.agent.BsAgentStaffService; +import com.hfkj.service.sec.SecUserService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +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 javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/agentStaff") +@Api(value = "代理商管理") +public class BsAgentStaffController { + private static Logger log = LoggerFactory.getLogger(BsAgentStaffController.class); + @Resource + private BsAgentStaffService agentStaffService; + @Resource + private SecUserService secUserService; + @Resource + private UserCenter userCenter; + + @RequestMapping(value = "/addStaff", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "增加业务员") + public ResponseData addStaff(@RequestBody JSONObject body) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (!userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + if (StringUtils.isBlank(body.getString("name")) + || StringUtils.isBlank(body.getString("telephone"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + BsAgentStaff staff = new BsAgentStaff(); + staff.setAgentId(userSession.getAccount().getObjectId()); + staff.setName(body.getString("name")); + staff.setTelephone(body.getString("telephone")); + agentStaffService.addStaff(staff); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/updateStaff", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "修改业务员") + public ResponseData updateStaff(@RequestBody JSONObject body) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (!userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + if (body.getLong("id") == null + || StringUtils.isBlank(body.getString("name")) + || StringUtils.isBlank(body.getString("telephone")) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 查询代理商 + BsAgentStaff staff = agentStaffService.getStaffDetailById(body.getLong("id")); + if (staff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到代理商信息"); + } + staff.setName(body.getString("name")); + staff.setTelephone(body.getString("telephone")); + agentStaffService.updateStaff(staff); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/delStaff", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "删除业务员") + public ResponseData delStaff(@RequestBody JSONObject body) { + try { + if (body.getLong("id") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + agentStaffService.delStaff(body.getLong("id")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/staffPwdReset", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "业务员密码重置") + public ResponseData staffPwdReset(@RequestBody JSONObject body, HttpServletRequest request) { + try { + if (body.getLong("id") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + agentStaffService.staffPwdReset(body.getLong("id")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getStaffDetail", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询工作人员详情") + public ResponseData getStaffDetail(@RequestParam(name = "id", required = true) Long id) { + try { + BsAgentStaff staff = agentStaffService.getStaffDetailById(id); + if (staff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的工作人员"); + } + Map map = new HashMap<>(); + map.put("staff",staff); + map.put("account", secUserService.getDetail(SecUserObjectTypeEnum.type5, staff.getId()) ); + return ResponseMsgUtil.success(map); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getStaffList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询工作人员列表") + public ResponseData getStaffList(@RequestParam(name = "agentId", required = false) Long agentId, + @RequestParam(name = "name", required = false) String name, + @RequestParam(name = "telephone", required = false) String telephone, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + + Map param = new HashMap<>(); + if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { + param.put("agentId", agentId); + } else if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) { + param.put("agentId", userSession.getAccount().getObjectId()); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + param.put("name", name); + param.put("telephone", telephone); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(agentStaffService.getStaffList(param))); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java index 22961b5..96055a9 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java @@ -44,10 +44,10 @@ public class BsGasOrderController { @Resource private BsDeviceService deviceService; - @RequestMapping(value="/queryUserOilOrder",method = RequestMethod.GET) + @RequestMapping(value="/queryOilOrderList",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询用户加油订单") - public ResponseData queryUserOilOrder(@RequestParam(name = "merId", required = false) Long merId, + public ResponseData queryOilOrderList(@RequestParam(name = "merId", required = false) Long merId, @RequestParam(name = "merName", required = false) String merName, @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "status", required = false) Integer status, diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMapper.java b/service/src/main/java/com/hfkj/dao/BsAgentMapper.java index 2a2fa20..2e53a7e 100644 --- a/service/src/main/java/com/hfkj/dao/BsAgentMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsAgentMapper.java @@ -39,16 +39,16 @@ public interface BsAgentMapper extends BsAgentMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into bs_agent (company_id, company_name, ", - "agent_no, `name`, contacts_name, ", - "contacts_telephone, `status`, ", - "create_time, update_time, ", - "ext_1, ext_2, ext_3)", - "values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", - "#{agentNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, ", - "#{contactsTelephone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "insert into bs_agent (agent_no, `name`, ", + "contacts_name, contacts_telephone, ", + "`status`, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{agentNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ", + "#{contactsName,jdbcType=VARCHAR}, #{contactsTelephone,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(BsAgent record); @@ -60,8 +60,6 @@ public interface BsAgentMapper extends BsAgentMapperExt { @SelectProvider(type=BsAgentSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="agent_no", property="agentNo", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="contacts_name", property="contactsName", jdbcType=JdbcType.VARCHAR), @@ -77,15 +75,13 @@ public interface BsAgentMapper extends BsAgentMapperExt { @Select({ "select", - "id, company_id, company_name, agent_no, `name`, contacts_name, contacts_telephone, ", - "`status`, create_time, update_time, ext_1, ext_2, ext_3", + "id, agent_no, `name`, contacts_name, contacts_telephone, `status`, create_time, ", + "update_time, ext_1, ext_2, ext_3", "from bs_agent", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="agent_no", property="agentNo", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="contacts_name", property="contactsName", jdbcType=JdbcType.VARCHAR), @@ -110,9 +106,7 @@ public interface BsAgentMapper extends BsAgentMapperExt { @Update({ "update bs_agent", - "set company_id = #{companyId,jdbcType=BIGINT},", - "company_name = #{companyName,jdbcType=VARCHAR},", - "agent_no = #{agentNo,jdbcType=VARCHAR},", + "set agent_no = #{agentNo,jdbcType=VARCHAR},", "`name` = #{name,jdbcType=VARCHAR},", "contacts_name = #{contactsName,jdbcType=VARCHAR},", "contacts_telephone = #{contactsTelephone,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMerMapper.java b/service/src/main/java/com/hfkj/dao/BsAgentMerMapper.java new file mode 100644 index 0000000..7fc454f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentMerMapper.java @@ -0,0 +1,137 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentMer; +import com.hfkj.entity.BsAgentMerExample; +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 BsAgentMerMapper extends BsAgentMerMapperExt { + @SelectProvider(type=BsAgentMerSqlProvider.class, method="countByExample") + long countByExample(BsAgentMerExample example); + + @DeleteProvider(type=BsAgentMerSqlProvider.class, method="deleteByExample") + int deleteByExample(BsAgentMerExample example); + + @Delete({ + "delete from bs_agent_mer", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_agent_mer (agent_id, agent_name, ", + "agent_staff_id, agent_staff_name, ", + "mer_id, mer_no, mer_name, ", + "qr_code_img_url, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ", + "#{agentStaffId,jdbcType=BIGINT}, #{agentStaffName,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, #{merName,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(BsAgentMer record); + + @InsertProvider(type=BsAgentMerSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsAgentMer record); + + @SelectProvider(type=BsAgentMerSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR), + @Result(column="agent_staff_id", property="agentStaffId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", 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(BsAgentMerExample example); + + @Select({ + "select", + "id, agent_id, agent_name, agent_staff_id, agent_staff_name, mer_id, mer_no, ", + "mer_name, qr_code_img_url, `status`, create_time, update_time, ext_1, ext_2, ", + "ext_3", + "from bs_agent_mer", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR), + @Result(column="agent_staff_id", property="agentStaffId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", 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) + }) + BsAgentMer selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsAgentMerSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsAgentMer record, @Param("example") BsAgentMerExample example); + + @UpdateProvider(type=BsAgentMerSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsAgentMer record, @Param("example") BsAgentMerExample example); + + @UpdateProvider(type=BsAgentMerSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsAgentMer record); + + @Update({ + "update bs_agent_mer", + "set agent_id = #{agentId,jdbcType=BIGINT},", + "agent_name = #{agentName,jdbcType=VARCHAR},", + "agent_staff_id = #{agentStaffId,jdbcType=BIGINT},", + "agent_staff_name = #{agentStaffName,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,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(BsAgentMer record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java b/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java new file mode 100644 index 0000000..78fa13b --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java @@ -0,0 +1,80 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentMer; +import com.hfkj.model.AgentMerAllot; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; + +/** + * mapper扩展类 + */ +public interface BsAgentMerMapperExt { + + @Insert(value = { + "" + }) + void addPatch(@Param(value = "dataList") List dataList); + + @Select({" "}) + List getAllotList(@Param("param") Map param); +} diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMerSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsAgentMerSqlProvider.java new file mode 100644 index 0000000..dec3930 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentMerSqlProvider.java @@ -0,0 +1,374 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentMer; +import com.hfkj.entity.BsAgentMerExample.Criteria; +import com.hfkj.entity.BsAgentMerExample.Criterion; +import com.hfkj.entity.BsAgentMerExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsAgentMerSqlProvider { + + public String countByExample(BsAgentMerExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_agent_mer"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsAgentMerExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_agent_mer"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsAgentMer record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_agent_mer"); + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.VALUES("agent_name", "#{agentName,jdbcType=VARCHAR}"); + } + + if (record.getAgentStaffId() != null) { + sql.VALUES("agent_staff_id", "#{agentStaffId,jdbcType=BIGINT}"); + } + + if (record.getAgentStaffName() != null) { + sql.VALUES("agent_staff_name", "#{agentStaffName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,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(BsAgentMerExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("agent_id"); + sql.SELECT("agent_name"); + sql.SELECT("agent_staff_id"); + sql.SELECT("agent_staff_name"); + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_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_agent_mer"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsAgentMer record = (BsAgentMer) parameter.get("record"); + BsAgentMerExample example = (BsAgentMerExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_agent_mer"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}"); + } + + if (record.getAgentStaffId() != null) { + sql.SET("agent_staff_id = #{record.agentStaffId,jdbcType=BIGINT}"); + } + + if (record.getAgentStaffName() != null) { + sql.SET("agent_staff_name = #{record.agentStaffName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,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_agent_mer"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}"); + sql.SET("agent_staff_id = #{record.agentStaffId,jdbcType=BIGINT}"); + sql.SET("agent_staff_name = #{record.agentStaffName,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,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}"); + + BsAgentMerExample example = (BsAgentMerExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsAgentMer record) { + SQL sql = new SQL(); + sql.UPDATE("bs_agent_mer"); + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.SET("agent_name = #{agentName,jdbcType=VARCHAR}"); + } + + if (record.getAgentStaffId() != null) { + sql.SET("agent_staff_id = #{agentStaffId,jdbcType=BIGINT}"); + } + + if (record.getAgentStaffName() != null) { + sql.SET("agent_staff_name = #{agentStaffName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,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, BsAgentMerExample 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/BsAgentPriceMapper.java b/service/src/main/java/com/hfkj/dao/BsAgentPriceMapper.java new file mode 100644 index 0000000..fef67e1 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentPriceMapper.java @@ -0,0 +1,133 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentPrice; +import com.hfkj.entity.BsAgentPriceExample; +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 BsAgentPriceMapper extends BsAgentPriceMapperExt { + @SelectProvider(type=BsAgentPriceSqlProvider.class, method="countByExample") + long countByExample(BsAgentPriceExample example); + + @DeleteProvider(type=BsAgentPriceSqlProvider.class, method="deleteByExample") + int deleteByExample(BsAgentPriceExample example); + + @Delete({ + "delete from bs_agent_price", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_agent_price (`type`, mer_id, ", + "mer_name, agent_mer_id, ", + "oil_no_name, oil_no, ", + "price_rate, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{type,jdbcType=INTEGER}, #{merId,jdbcType=BIGINT}, ", + "#{merName,jdbcType=VARCHAR}, #{agentMerId,jdbcType=BIGINT}, ", + "#{oilNoName,jdbcType=VARCHAR}, #{oilNo,jdbcType=VARCHAR}, ", + "#{priceRate,jdbcType=DECIMAL}, #{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(BsAgentPrice record); + + @InsertProvider(type=BsAgentPriceSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsAgentPrice record); + + @SelectProvider(type=BsAgentPriceSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="agent_mer_id", property="agentMerId", jdbcType=JdbcType.BIGINT), + @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="price_rate", property="priceRate", jdbcType=JdbcType.DECIMAL), + @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(BsAgentPriceExample example); + + @Select({ + "select", + "id, `type`, mer_id, mer_name, agent_mer_id, oil_no_name, oil_no, price_rate, ", + "`status`, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_agent_price", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="agent_mer_id", property="agentMerId", jdbcType=JdbcType.BIGINT), + @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="price_rate", property="priceRate", jdbcType=JdbcType.DECIMAL), + @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) + }) + BsAgentPrice selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsAgentPriceSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsAgentPrice record, @Param("example") BsAgentPriceExample example); + + @UpdateProvider(type=BsAgentPriceSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsAgentPrice record, @Param("example") BsAgentPriceExample example); + + @UpdateProvider(type=BsAgentPriceSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsAgentPrice record); + + @Update({ + "update bs_agent_price", + "set `type` = #{type,jdbcType=INTEGER},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "agent_mer_id = #{agentMerId,jdbcType=BIGINT},", + "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", + "price_rate = #{priceRate,jdbcType=DECIMAL},", + "`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(BsAgentPrice record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsAgentPriceMapperExt.java b/service/src/main/java/com/hfkj/dao/BsAgentPriceMapperExt.java new file mode 100644 index 0000000..5723808 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentPriceMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsAgentPriceMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsAgentPriceSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsAgentPriceSqlProvider.java new file mode 100644 index 0000000..9fd563f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentPriceSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentPrice; +import com.hfkj.entity.BsAgentPriceExample.Criteria; +import com.hfkj.entity.BsAgentPriceExample.Criterion; +import com.hfkj.entity.BsAgentPriceExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsAgentPriceSqlProvider { + + public String countByExample(BsAgentPriceExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_agent_price"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsAgentPriceExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_agent_price"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsAgentPrice record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_agent_price"); + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getAgentMerId() != null) { + sql.VALUES("agent_mer_id", "#{agentMerId,jdbcType=BIGINT}"); + } + + if (record.getOilNoName() != null) { + sql.VALUES("oil_no_name", "#{oilNoName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.VALUES("price_rate", "#{priceRate,jdbcType=DECIMAL}"); + } + + 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(BsAgentPriceExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("`type`"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("agent_mer_id"); + sql.SELECT("oil_no_name"); + sql.SELECT("oil_no"); + sql.SELECT("price_rate"); + 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_agent_price"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsAgentPrice record = (BsAgentPrice) parameter.get("record"); + BsAgentPriceExample example = (BsAgentPriceExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_agent_price"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getAgentMerId() != null) { + sql.SET("agent_mer_id = #{record.agentMerId,jdbcType=BIGINT}"); + } + + if (record.getOilNoName() != null) { + sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.SET("price_rate = #{record.priceRate,jdbcType=DECIMAL}"); + } + + 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_agent_price"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("agent_mer_id = #{record.agentMerId,jdbcType=BIGINT}"); + sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + sql.SET("price_rate = #{record.priceRate,jdbcType=DECIMAL}"); + 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}"); + + BsAgentPriceExample example = (BsAgentPriceExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsAgentPrice record) { + SQL sql = new SQL(); + sql.UPDATE("bs_agent_price"); + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getAgentMerId() != null) { + sql.SET("agent_mer_id = #{agentMerId,jdbcType=BIGINT}"); + } + + if (record.getOilNoName() != null) { + sql.SET("oil_no_name = #{oilNoName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.SET("price_rate = #{priceRate,jdbcType=DECIMAL}"); + } + + 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, BsAgentPriceExample 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/BsAgentSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsAgentSqlProvider.java index 3e7f486..0885dc1 100644 --- a/service/src/main/java/com/hfkj/dao/BsAgentSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsAgentSqlProvider.java @@ -28,14 +28,6 @@ public class BsAgentSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("bs_agent"); - if (record.getCompanyId() != null) { - sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); - } - - if (record.getCompanyName() != null) { - sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); - } - if (record.getAgentNo() != null) { sql.VALUES("agent_no", "#{agentNo,jdbcType=VARCHAR}"); } @@ -86,8 +78,6 @@ public class BsAgentSqlProvider { } else { sql.SELECT("id"); } - sql.SELECT("company_id"); - sql.SELECT("company_name"); sql.SELECT("agent_no"); sql.SELECT("`name`"); sql.SELECT("contacts_name"); @@ -119,14 +109,6 @@ public class BsAgentSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } - if (record.getCompanyId() != null) { - sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); - } - - if (record.getCompanyName() != null) { - sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); - } - if (record.getAgentNo() != null) { sql.SET("agent_no = #{record.agentNo,jdbcType=VARCHAR}"); } @@ -176,8 +158,6 @@ public class BsAgentSqlProvider { sql.UPDATE("bs_agent"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); - sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); - sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); sql.SET("agent_no = #{record.agentNo,jdbcType=VARCHAR}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); sql.SET("contacts_name = #{record.contactsName,jdbcType=VARCHAR}"); @@ -198,14 +178,6 @@ public class BsAgentSqlProvider { SQL sql = new SQL(); sql.UPDATE("bs_agent"); - if (record.getCompanyId() != null) { - sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); - } - - if (record.getCompanyName() != null) { - sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); - } - if (record.getAgentNo() != null) { sql.SET("agent_no = #{agentNo,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/dao/BsAgentStaffMapper.java b/service/src/main/java/com/hfkj/dao/BsAgentStaffMapper.java new file mode 100644 index 0000000..4f878fa --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentStaffMapper.java @@ -0,0 +1,122 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentStaff; +import com.hfkj.entity.BsAgentStaffExample; +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 BsAgentStaffMapper extends BsAgentStaffMapperExt { + @SelectProvider(type=BsAgentStaffSqlProvider.class, method="countByExample") + long countByExample(BsAgentStaffExample example); + + @DeleteProvider(type=BsAgentStaffSqlProvider.class, method="deleteByExample") + int deleteByExample(BsAgentStaffExample example); + + @Delete({ + "delete from bs_agent_staff", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_agent_staff (agent_id, avatar, ", + "`name`, telephone, ", + "`status`, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{agentId,jdbcType=BIGINT}, #{avatar,jdbcType=VARCHAR}, ", + "#{name,jdbcType=VARCHAR}, #{telephone,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(BsAgentStaff record); + + @InsertProvider(type=BsAgentStaffSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsAgentStaff record); + + @SelectProvider(type=BsAgentStaffSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", 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="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(BsAgentStaffExample example); + + @Select({ + "select", + "id, agent_id, avatar, `name`, telephone, `status`, create_time, update_time, ", + "ext_1, ext_2, ext_3", + "from bs_agent_staff", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", 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="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) + }) + BsAgentStaff selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsAgentStaffSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsAgentStaff record, @Param("example") BsAgentStaffExample example); + + @UpdateProvider(type=BsAgentStaffSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsAgentStaff record, @Param("example") BsAgentStaffExample example); + + @UpdateProvider(type=BsAgentStaffSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsAgentStaff record); + + @Update({ + "update bs_agent_staff", + "set agent_id = #{agentId,jdbcType=BIGINT},", + "avatar = #{avatar,jdbcType=VARCHAR},", + "`name` = #{name,jdbcType=VARCHAR},", + "telephone = #{telephone,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(BsAgentStaff record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsAgentStaffMapperExt.java b/service/src/main/java/com/hfkj/dao/BsAgentStaffMapperExt.java new file mode 100644 index 0000000..bcbcb58 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentStaffMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsAgentStaffMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsAgentStaffSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsAgentStaffSqlProvider.java new file mode 100644 index 0000000..2253c49 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsAgentStaffSqlProvider.java @@ -0,0 +1,318 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsAgentStaff; +import com.hfkj.entity.BsAgentStaffExample.Criteria; +import com.hfkj.entity.BsAgentStaffExample.Criterion; +import com.hfkj.entity.BsAgentStaffExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsAgentStaffSqlProvider { + + public String countByExample(BsAgentStaffExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_agent_staff"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsAgentStaffExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_agent_staff"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsAgentStaff record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_agent_staff"); + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,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.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(BsAgentStaffExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("agent_id"); + sql.SELECT("avatar"); + sql.SELECT("`name`"); + sql.SELECT("telephone"); + 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_agent_staff"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsAgentStaff record = (BsAgentStaff) parameter.get("record"); + BsAgentStaffExample example = (BsAgentStaffExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_agent_staff"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,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.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_agent_staff"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("agent_id = #{record.agentId,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("`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}"); + + BsAgentStaffExample example = (BsAgentStaffExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsAgentStaff record) { + SQL sql = new SQL(); + sql.UPDATE("bs_agent_staff"); + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,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.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, BsAgentStaffExample 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/entity/BsAgent.java b/service/src/main/java/com/hfkj/entity/BsAgent.java index 557a357..e3adda9 100644 --- a/service/src/main/java/com/hfkj/entity/BsAgent.java +++ b/service/src/main/java/com/hfkj/entity/BsAgent.java @@ -18,16 +18,6 @@ public class BsAgent implements Serializable { */ private Long id; - /** - * 公司id - */ - private Long companyId; - - /** - * 公司名称 - */ - private String companyName; - /** * 代理商编号 */ @@ -79,22 +69,6 @@ public class BsAgent implements Serializable { this.id = id; } - public Long getCompanyId() { - return companyId; - } - - public void setCompanyId(Long companyId) { - this.companyId = companyId; - } - - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - public String getAgentNo() { return agentNo; } @@ -188,8 +162,6 @@ public class BsAgent implements Serializable { } BsAgent other = (BsAgent) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) - && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) && (this.getAgentNo() == null ? other.getAgentNo() == null : this.getAgentNo().equals(other.getAgentNo())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getContactsName() == null ? other.getContactsName() == null : this.getContactsName().equals(other.getContactsName())) @@ -207,8 +179,6 @@ public class BsAgent implements Serializable { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); - result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); result = prime * result + ((getAgentNo() == null) ? 0 : getAgentNo().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getContactsName() == null) ? 0 : getContactsName().hashCode()); @@ -229,8 +199,6 @@ public class BsAgent implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); - sb.append(", companyId=").append(companyId); - sb.append(", companyName=").append(companyName); sb.append(", agentNo=").append(agentNo); sb.append(", name=").append(name); sb.append(", contactsName=").append(contactsName); diff --git a/service/src/main/java/com/hfkj/entity/BsAgentExample.java b/service/src/main/java/com/hfkj/entity/BsAgentExample.java index 8d41a13..87ddb86 100644 --- a/service/src/main/java/com/hfkj/entity/BsAgentExample.java +++ b/service/src/main/java/com/hfkj/entity/BsAgentExample.java @@ -185,136 +185,6 @@ public class BsAgentExample { return (Criteria) this; } - public Criteria andCompanyIdIsNull() { - addCriterion("company_id is null"); - return (Criteria) this; - } - - public Criteria andCompanyIdIsNotNull() { - addCriterion("company_id is not null"); - return (Criteria) this; - } - - public Criteria andCompanyIdEqualTo(Long value) { - addCriterion("company_id =", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotEqualTo(Long value) { - addCriterion("company_id <>", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdGreaterThan(Long value) { - addCriterion("company_id >", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { - addCriterion("company_id >=", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdLessThan(Long value) { - addCriterion("company_id <", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdLessThanOrEqualTo(Long value) { - addCriterion("company_id <=", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdIn(List values) { - addCriterion("company_id in", values, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotIn(List values) { - addCriterion("company_id not in", values, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdBetween(Long value1, Long value2) { - addCriterion("company_id between", value1, value2, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotBetween(Long value1, Long value2) { - addCriterion("company_id not between", value1, value2, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyNameIsNull() { - addCriterion("company_name is null"); - return (Criteria) this; - } - - public Criteria andCompanyNameIsNotNull() { - addCriterion("company_name is not null"); - return (Criteria) this; - } - - public Criteria andCompanyNameEqualTo(String value) { - addCriterion("company_name =", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotEqualTo(String value) { - addCriterion("company_name <>", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameGreaterThan(String value) { - addCriterion("company_name >", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { - addCriterion("company_name >=", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLessThan(String value) { - addCriterion("company_name <", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLessThanOrEqualTo(String value) { - addCriterion("company_name <=", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLike(String value) { - addCriterion("company_name like", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotLike(String value) { - addCriterion("company_name not like", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameIn(List values) { - addCriterion("company_name in", values, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotIn(List values) { - addCriterion("company_name not in", values, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameBetween(String value1, String value2) { - addCriterion("company_name between", value1, value2, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotBetween(String value1, String value2) { - addCriterion("company_name not between", value1, value2, "companyName"); - return (Criteria) this; - } - public Criteria andAgentNoIsNull() { addCriterion("agent_no is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/entity/BsAgentMer.java b/service/src/main/java/com/hfkj/entity/BsAgentMer.java new file mode 100644 index 0000000..00274ca --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentMer.java @@ -0,0 +1,277 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_agent_mer + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsAgentMer implements Serializable { + private Long id; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 代理商名称 + */ + private String agentName; + + /** + * 工作人员id + */ + private Long agentStaffId; + + /** + * 工作人员名称 + */ + private String agentStaffName; + + /** + * 加油站id + */ + private Long merId; + + /** + * 加油站编号 + */ + private String merNo; + + /** + * 加油站名称 + */ + private String merName; + + /** + * 二维码图片地址 + */ + private String qrCodeImgUrl; + + /** + * 状态 0:删除 1:正常 + */ + 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 getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + public String getAgentName() { + return agentName; + } + + public void setAgentName(String agentName) { + this.agentName = agentName; + } + + public Long getAgentStaffId() { + return agentStaffId; + } + + public void setAgentStaffId(Long agentStaffId) { + this.agentStaffId = agentStaffId; + } + + public String getAgentStaffName() { + return agentStaffName; + } + + public void setAgentStaffName(String agentStaffName) { + this.agentStaffName = agentStaffName; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + 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; + } + BsAgentMer other = (BsAgentMer) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) + && (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName())) + && (this.getAgentStaffId() == null ? other.getAgentStaffId() == null : this.getAgentStaffId().equals(other.getAgentStaffId())) + && (this.getAgentStaffName() == null ? other.getAgentStaffName() == null : this.getAgentStaffName().equals(other.getAgentStaffName())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (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 + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); + result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode()); + result = prime * result + ((getAgentStaffId() == null) ? 0 : getAgentStaffId().hashCode()); + result = prime * result + ((getAgentStaffName() == null) ? 0 : getAgentStaffName().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().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(", agentId=").append(agentId); + sb.append(", agentName=").append(agentName); + sb.append(", agentStaffId=").append(agentStaffId); + sb.append(", agentStaffName=").append(agentStaffName); + sb.append(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + 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/BsAgentMerExample.java b/service/src/main/java/com/hfkj/entity/BsAgentMerExample.java new file mode 100644 index 0000000..4dec7ab --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentMerExample.java @@ -0,0 +1,1203 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsAgentMerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsAgentMerExample() { + 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 andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNull() { + addCriterion("agent_name is null"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNotNull() { + addCriterion("agent_name is not null"); + return (Criteria) this; + } + + public Criteria andAgentNameEqualTo(String value) { + addCriterion("agent_name =", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotEqualTo(String value) { + addCriterion("agent_name <>", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThan(String value) { + addCriterion("agent_name >", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThanOrEqualTo(String value) { + addCriterion("agent_name >=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThan(String value) { + addCriterion("agent_name <", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThanOrEqualTo(String value) { + addCriterion("agent_name <=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLike(String value) { + addCriterion("agent_name like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotLike(String value) { + addCriterion("agent_name not like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameIn(List values) { + addCriterion("agent_name in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotIn(List values) { + addCriterion("agent_name not in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameBetween(String value1, String value2) { + addCriterion("agent_name between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotBetween(String value1, String value2) { + addCriterion("agent_name not between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdIsNull() { + addCriterion("agent_staff_id is null"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdIsNotNull() { + addCriterion("agent_staff_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdEqualTo(Long value) { + addCriterion("agent_staff_id =", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdNotEqualTo(Long value) { + addCriterion("agent_staff_id <>", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdGreaterThan(Long value) { + addCriterion("agent_staff_id >", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_staff_id >=", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdLessThan(Long value) { + addCriterion("agent_staff_id <", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdLessThanOrEqualTo(Long value) { + addCriterion("agent_staff_id <=", value, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdIn(List values) { + addCriterion("agent_staff_id in", values, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdNotIn(List values) { + addCriterion("agent_staff_id not in", values, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdBetween(Long value1, Long value2) { + addCriterion("agent_staff_id between", value1, value2, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffIdNotBetween(Long value1, Long value2) { + addCriterion("agent_staff_id not between", value1, value2, "agentStaffId"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameIsNull() { + addCriterion("agent_staff_name is null"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameIsNotNull() { + addCriterion("agent_staff_name is not null"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameEqualTo(String value) { + addCriterion("agent_staff_name =", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameNotEqualTo(String value) { + addCriterion("agent_staff_name <>", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameGreaterThan(String value) { + addCriterion("agent_staff_name >", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameGreaterThanOrEqualTo(String value) { + addCriterion("agent_staff_name >=", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameLessThan(String value) { + addCriterion("agent_staff_name <", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameLessThanOrEqualTo(String value) { + addCriterion("agent_staff_name <=", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameLike(String value) { + addCriterion("agent_staff_name like", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameNotLike(String value) { + addCriterion("agent_staff_name not like", value, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameIn(List values) { + addCriterion("agent_staff_name in", values, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameNotIn(List values) { + addCriterion("agent_staff_name not in", values, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameBetween(String value1, String value2) { + addCriterion("agent_staff_name between", value1, value2, "agentStaffName"); + return (Criteria) this; + } + + public Criteria andAgentStaffNameNotBetween(String value1, String value2) { + addCriterion("agent_staff_name not between", value1, value2, "agentStaffName"); + 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 andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + 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/BsAgentPrice.java b/service/src/main/java/com/hfkj/entity/BsAgentPrice.java new file mode 100644 index 0000000..a24589e --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentPrice.java @@ -0,0 +1,262 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_agent_price + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsAgentPrice implements Serializable { + private Long id; + + /** + * 类型 1:平台 2:代理商 + */ + private Integer type; + + /** + * 加油站id + */ + private Long merId; + + /** + * 加油站名称 + */ + private String merName; + + /** + * 代理油站数据id + */ + private Long agentMerId; + + /** + * 油号名称 + */ + private String oilNoName; + + /** + * 油号 + */ + private String oilNo; + + /** + * 优惠比例 + */ + private BigDecimal priceRate; + + /** + * 状态 0:删除 1:正常 + */ + 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 Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Long getAgentMerId() { + return agentMerId; + } + + public void setAgentMerId(Long agentMerId) { + this.agentMerId = agentMerId; + } + + public String getOilNoName() { + return oilNoName; + } + + public void setOilNoName(String oilNoName) { + this.oilNoName = oilNoName; + } + + public String getOilNo() { + return oilNo; + } + + public void setOilNo(String oilNo) { + this.oilNo = oilNo; + } + + public BigDecimal getPriceRate() { + return priceRate; + } + + public void setPriceRate(BigDecimal priceRate) { + this.priceRate = priceRate; + } + + 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; + } + BsAgentPrice other = (BsAgentPrice) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getAgentMerId() == null ? other.getAgentMerId() == null : this.getAgentMerId().equals(other.getAgentMerId())) + && (this.getOilNoName() == null ? other.getOilNoName() == null : this.getOilNoName().equals(other.getOilNoName())) + && (this.getOilNo() == null ? other.getOilNo() == null : this.getOilNo().equals(other.getOilNo())) + && (this.getPriceRate() == null ? other.getPriceRate() == null : this.getPriceRate().equals(other.getPriceRate())) + && (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 + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getAgentMerId() == null) ? 0 : getAgentMerId().hashCode()); + result = prime * result + ((getOilNoName() == null) ? 0 : getOilNoName().hashCode()); + result = prime * result + ((getOilNo() == null) ? 0 : getOilNo().hashCode()); + result = prime * result + ((getPriceRate() == null) ? 0 : getPriceRate().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(", type=").append(type); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", agentMerId=").append(agentMerId); + sb.append(", oilNoName=").append(oilNoName); + sb.append(", oilNo=").append(oilNo); + sb.append(", priceRate=").append(priceRate); + 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/BsAgentPriceExample.java b/service/src/main/java/com/hfkj/entity/BsAgentPriceExample.java new file mode 100644 index 0000000..0a6ae36 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentPriceExample.java @@ -0,0 +1,1124 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsAgentPriceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsAgentPriceExample() { + 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 andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + 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 andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andAgentMerIdIsNull() { + addCriterion("agent_mer_id is null"); + return (Criteria) this; + } + + public Criteria andAgentMerIdIsNotNull() { + addCriterion("agent_mer_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentMerIdEqualTo(Long value) { + addCriterion("agent_mer_id =", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdNotEqualTo(Long value) { + addCriterion("agent_mer_id <>", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdGreaterThan(Long value) { + addCriterion("agent_mer_id >", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_mer_id >=", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdLessThan(Long value) { + addCriterion("agent_mer_id <", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdLessThanOrEqualTo(Long value) { + addCriterion("agent_mer_id <=", value, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdIn(List values) { + addCriterion("agent_mer_id in", values, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdNotIn(List values) { + addCriterion("agent_mer_id not in", values, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdBetween(Long value1, Long value2) { + addCriterion("agent_mer_id between", value1, value2, "agentMerId"); + return (Criteria) this; + } + + public Criteria andAgentMerIdNotBetween(Long value1, Long value2) { + addCriterion("agent_mer_id not between", value1, value2, "agentMerId"); + return (Criteria) this; + } + + public Criteria andOilNoNameIsNull() { + addCriterion("oil_no_name is null"); + return (Criteria) this; + } + + public Criteria andOilNoNameIsNotNull() { + addCriterion("oil_no_name is not null"); + return (Criteria) this; + } + + public Criteria andOilNoNameEqualTo(String value) { + addCriterion("oil_no_name =", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameNotEqualTo(String value) { + addCriterion("oil_no_name <>", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameGreaterThan(String value) { + addCriterion("oil_no_name >", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameGreaterThanOrEqualTo(String value) { + addCriterion("oil_no_name >=", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameLessThan(String value) { + addCriterion("oil_no_name <", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameLessThanOrEqualTo(String value) { + addCriterion("oil_no_name <=", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameLike(String value) { + addCriterion("oil_no_name like", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameNotLike(String value) { + addCriterion("oil_no_name not like", value, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameIn(List values) { + addCriterion("oil_no_name in", values, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameNotIn(List values) { + addCriterion("oil_no_name not in", values, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameBetween(String value1, String value2) { + addCriterion("oil_no_name between", value1, value2, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoNameNotBetween(String value1, String value2) { + addCriterion("oil_no_name not between", value1, value2, "oilNoName"); + return (Criteria) this; + } + + public Criteria andOilNoIsNull() { + addCriterion("oil_no is null"); + return (Criteria) this; + } + + public Criteria andOilNoIsNotNull() { + addCriterion("oil_no is not null"); + return (Criteria) this; + } + + public Criteria andOilNoEqualTo(String value) { + addCriterion("oil_no =", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotEqualTo(String value) { + addCriterion("oil_no <>", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThan(String value) { + addCriterion("oil_no >", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThanOrEqualTo(String value) { + addCriterion("oil_no >=", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThan(String value) { + addCriterion("oil_no <", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThanOrEqualTo(String value) { + addCriterion("oil_no <=", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { + addCriterion("oil_no in", values, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotIn(List values) { + addCriterion("oil_no not in", values, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoBetween(String value1, String value2) { + addCriterion("oil_no between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotBetween(String value1, String value2) { + addCriterion("oil_no not between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andPriceRateIsNull() { + addCriterion("price_rate is null"); + return (Criteria) this; + } + + public Criteria andPriceRateIsNotNull() { + addCriterion("price_rate is not null"); + return (Criteria) this; + } + + public Criteria andPriceRateEqualTo(BigDecimal value) { + addCriterion("price_rate =", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotEqualTo(BigDecimal value) { + addCriterion("price_rate <>", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateGreaterThan(BigDecimal value) { + addCriterion("price_rate >", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price_rate >=", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateLessThan(BigDecimal value) { + addCriterion("price_rate <", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateLessThanOrEqualTo(BigDecimal value) { + addCriterion("price_rate <=", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateIn(List values) { + addCriterion("price_rate in", values, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotIn(List values) { + addCriterion("price_rate not in", values, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_rate between", value1, value2, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_rate not between", value1, value2, "priceRate"); + 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/BsAgentStaff.java b/service/src/main/java/com/hfkj/entity/BsAgentStaff.java new file mode 100644 index 0000000..067216b --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentStaff.java @@ -0,0 +1,216 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_agent_staff + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsAgentStaff implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 工作人员头像 + */ + private String avatar; + + /** + * 工作人员名称 + */ + private String name; + + /** + * 工作人员电话 + */ + private String telephone; + + /** + * 状态 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 getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + 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 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; + } + BsAgentStaff other = (BsAgentStaff) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) + && (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.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 + ((getAgentId() == null) ? 0 : getAgentId().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 + ((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(", agentId=").append(agentId); + sb.append(", avatar=").append(avatar); + sb.append(", name=").append(name); + sb.append(", telephone=").append(telephone); + 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/BsAgentStaffExample.java b/service/src/main/java/com/hfkj/entity/BsAgentStaffExample.java new file mode 100644 index 0000000..8c98f64 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsAgentStaffExample.java @@ -0,0 +1,943 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsAgentStaffExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsAgentStaffExample() { + 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 andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + 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 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/model/AgentMerAllot.java b/service/src/main/java/com/hfkj/model/AgentMerAllot.java new file mode 100644 index 0000000..72cc7bc --- /dev/null +++ b/service/src/main/java/com/hfkj/model/AgentMerAllot.java @@ -0,0 +1,24 @@ +package com.hfkj.model; + +import lombok.Data; + +import java.util.Date; + +/** + * @className: AgentMerAllot + * @author: HuRui + * @date: 2024/6/18 + **/ +@Data +public class AgentMerAllot { + private String provinceCode; + private String provinceName; + private Integer merSourceType; + private String merNo; + private String merName; + private String merAddress; + private String agentName; + private Date createTime; + private String agentStaff; + +} diff --git a/service/src/main/java/com/hfkj/service/agent/BsAgentMerService.java b/service/src/main/java/com/hfkj/service/agent/BsAgentMerService.java new file mode 100644 index 0000000..57e101e --- /dev/null +++ b/service/src/main/java/com/hfkj/service/agent/BsAgentMerService.java @@ -0,0 +1,69 @@ +package com.hfkj.service.agent; + +import com.hfkj.entity.BsAgentMer; +import com.hfkj.model.AgentMerAllot; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsAgentMerService + * @author: HuRui + * @date: 2024/6/15 + **/ +public interface BsAgentMerService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsAgentMer data); + + /** + * 批量增加 + * @param dataList + */ + void addData(List dataList); + + /** + * 分配代理商 + * @param agentId + * @param merNoArray + */ + void assignAgent(Long agentId, List merNoArray); + + /** + * 解绑代理商 + * @param agentId + * @param merNoArray + */ + void unbindAgent(Long agentId, List merNoArray); + + /** + * + * @param param + * @return + */ + List getAllotList(Map param); + + /** + * 查询列表 + * @param param + * @return + */ + List getList(Map param); + + /** + * 分配工作人员 + * @param staffId + * @param merNoArray + */ + void assignStaff(Long staffId, List merNoArray); + + /** + * 解绑工作人员 + * @param staffId + * @param merNoArray + */ + void unbindStaff(Long staffId, List merNoArray); +} diff --git a/service/src/main/java/com/hfkj/service/BsAgentService.java b/service/src/main/java/com/hfkj/service/agent/BsAgentService.java similarity index 96% rename from service/src/main/java/com/hfkj/service/BsAgentService.java rename to service/src/main/java/com/hfkj/service/agent/BsAgentService.java index 491eba6..263e8f5 100644 --- a/service/src/main/java/com/hfkj/service/BsAgentService.java +++ b/service/src/main/java/com/hfkj/service/agent/BsAgentService.java @@ -1,4 +1,4 @@ -package com.hfkj.service; +package com.hfkj.service.agent; import com.hfkj.entity.BsAgent; diff --git a/service/src/main/java/com/hfkj/service/agent/BsAgentStaffService.java b/service/src/main/java/com/hfkj/service/agent/BsAgentStaffService.java new file mode 100644 index 0000000..3604570 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/agent/BsAgentStaffService.java @@ -0,0 +1,66 @@ +package com.hfkj.service.agent; + +import com.hfkj.entity.BsAgentStaff; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsAgentStaffService + * @author: HuRui + * @date: 2024/6/17 + **/ +public interface BsAgentStaffService { + + /** + * 编辑工作人员数据 + * @param agentStaff + */ + void editData(BsAgentStaff agentStaff); + + /** + * 增加工作人员 + * @param agentStaff + */ + void addStaff(BsAgentStaff agentStaff) throws Exception; + + /** + * 修改工作人员 + * @param agentStaff + */ + void updateStaff(BsAgentStaff agentStaff); + + /** + * 删除工作人员 + * @param id + */ + void delStaff(Long id); + + /** + * 工作人员密码重置 + * @param id + */ + void staffPwdReset(Long id); + + /** + * 根据id查询 + * @param id + * @return + */ + BsAgentStaff getStaffDetailById(Long id); + + /** + * 查询工作人员列表 + * @param param + * @return + */ + List getStaffList(Map param); + + /** + * 查询工作人员 + * @param agentId + * @return + */ + List getStaffList(Long agentId); + +} diff --git a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java new file mode 100644 index 0000000..1d6a682 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java @@ -0,0 +1,194 @@ +package com.hfkj.service.agent.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.dao.BsAgentMerMapper; +import com.hfkj.entity.*; +import com.hfkj.model.AgentMerAllot; +import com.hfkj.service.BsMerchantService; +import com.hfkj.service.agent.BsAgentMerService; +import com.hfkj.service.agent.BsAgentService; +import com.hfkj.service.agent.BsAgentStaffService; +import org.apache.commons.collections4.MapUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import java.util.stream.LongStream; + +/** + * @className: BsAgentMerServiceImpl + * @author: HuRui + * @date: 2024/6/15 + **/ +@Service("agentMerService") +public class BsAgentMerServiceImpl implements BsAgentMerService { + @Resource + private BsAgentMerMapper agentMerMapper; + @Resource + private BsAgentService agentService; + @Resource + private BsAgentMerService agentMerService; + @Resource + private BsAgentStaffService agentStaffService; + @Resource + private BsMerchantService merchantService; + @Override + public void editData(BsAgentMer data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + agentMerMapper.insert(data); + } else { + agentMerMapper.updateByPrimaryKey(data); + } + } + + @Override + public void addData(List dataList) { + agentMerMapper.addPatch(dataList); + } + + @Override + public void assignAgent(Long agentId, List merNoArray) { + // 代理商 + BsAgent agent = agentService.getAgentById(agentId); + if (agent == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的代理商"); + } + + // 查询代理商的油站 + Map param = new HashMap<>(); + param.put("agentId", agent.getId()); + List agentMerList = getList(param); + + List dataList = new ArrayList<>(); + BsAgentMer agentMer; + for (String merNo : merNoArray) { + // 查询门店 + BsMerchant merchant = merchantService.getMerchant(merNo); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站"); + } + List collect = agentMerList.stream().filter(o -> o.getMerNo().equals(merNo)).collect(Collectors.toList()); + if (collect.isEmpty()) { + agentMer = new BsAgentMer(); + agentMer.setAgentId(agent.getId()); + agentMer.setAgentName(agent.getName()); + agentMer.setAgentName(agent.getName()); + agentMer.setMerId(merchant.getId()); + agentMer.setMerNo(merchant.getMerNo()); + agentMer.setMerName(merchant.getMerName()); + agentMer.setStatus(1); + agentMer.setCreateTime(new Date()); + agentMer.setUpdateTime(new Date()); + dataList.add(agentMer); + } + } + agentMerService.addData(dataList); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void unbindAgent(Long agentId, List merNoArray) { + // 删除代理商商户 + BsAgentMer agentMer = new BsAgentMer(); + agentMer.setStatus(0); + BsAgentMerExample example = new BsAgentMerExample(); + example.createCriteria().andAgentIdEqualTo(agentId).andMerNoIn(merNoArray).andStatusNotEqualTo(0); + agentMerMapper.updateByExampleSelective(agentMer, example); + + // 删除代理商下的工作人员商户 + List staffIdList = agentStaffService.getStaffList(agentId) + .stream() + .flatMapToLong(num -> LongStream.of(num.getId())).boxed() + .collect(Collectors.toList()); + example.clear(); + example.createCriteria().andAgentStaffIdIn(staffIdList).andMerNoIn(merNoArray).andStatusNotEqualTo(0); + agentMerMapper.updateByExampleSelective(agentMer, example); + } + + @Override + public List getAllotList(Map param) { + return agentMerMapper.getAllotList(param); + } + + @Override + public List getList(Map param) { + BsAgentMerExample example = new BsAgentMerExample(); + BsAgentMerExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "agentId") != null) { + criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId")); + } + + if (MapUtils.getLong(param, "agentStaffId") != null) { + criteria.andAgentStaffIdEqualTo(MapUtils.getLong(param, "agentStaffId")); + } + + example.setOrderByClause("create_time desc"); + return agentMerMapper.selectByExample(example); + } + + @Override + public void assignStaff(Long staffId, List merNoArray) { + // 代理商工作人员 + BsAgentStaff staff = agentStaffService.getStaffDetailById(staffId); + if (staff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的代理商"); + } + // 代理商 + BsAgent agent = agentService.getAgentById(staff.getAgentId()); + if (agent == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的代理商"); + } + // 查询代理商工作人员的油站 + Map param = new HashMap<>(); + param.put("agentStaffId", agent.getId()); + List agentMerList = getList(param); + + List dataList = new ArrayList<>(); + BsAgentMer agentMer; + for (String merNo : merNoArray) { + // 查询门店 + BsMerchant merchant = merchantService.getMerchant(merNo); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站"); + } + List collect = agentMerList.stream().filter(o -> o.getMerNo().equals(merNo)).collect(Collectors.toList()); + if (collect.isEmpty()) { + agentMer = new BsAgentMer(); + agentMer.setAgentId(agent.getId()); + agentMer.setAgentName(agent.getName()); + agentMer.setAgentName(agent.getName()); + agentMer.setAgentStaffId(staff.getId()); + agentMer.setAgentStaffName(staff.getName()); + agentMer.setMerId(merchant.getId()); + agentMer.setMerNo(merchant.getMerNo()); + agentMer.setMerName(merchant.getMerName()); + agentMer.setStatus(1); + agentMer.setCreateTime(new Date()); + agentMer.setUpdateTime(new Date()); + dataList.add(agentMer); + } + } + agentMerService.addData(dataList); + } + + @Override + public void unbindStaff(Long staffId, List merNoArray) { + // 删除商户 + BsAgentMer agentMer = new BsAgentMer(); + agentMer.setStatus(0); + BsAgentMerExample example = new BsAgentMerExample(); + example.createCriteria().andAgentStaffIdEqualTo(staffId).andMerNoIn(merNoArray).andStatusNotEqualTo(0); + agentMerMapper.updateByExampleSelective(agentMer, example); + } + + +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentServiceImpl.java similarity index 94% rename from service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java rename to service/src/main/java/com/hfkj/service/agent/impl/BsAgentServiceImpl.java index 4581e5e..8f6dbe3 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsAgentServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentServiceImpl.java @@ -1,4 +1,4 @@ -package com.hfkj.service.impl; +package com.hfkj.service.agent.impl; import com.hfkj.common.utils.MD5Util; import com.hfkj.common.utils.RedisUtil; @@ -6,7 +6,7 @@ import com.hfkj.dao.BsAgentMapper; import com.hfkj.entity.BsAgent; import com.hfkj.entity.BsAgentExample; import com.hfkj.entity.SecUser; -import com.hfkj.service.BsAgentService; +import com.hfkj.service.agent.BsAgentService; import com.hfkj.service.sec.SecUserService; import com.hfkj.sysenum.SecUserObjectTypeEnum; import org.apache.commons.collections4.MapUtils; @@ -111,10 +111,6 @@ public class BsAgentServiceImpl implements BsAgentService { BsAgentExample example = new BsAgentExample(); BsAgentExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); - if (MapUtils.getLong(param, "companyId") != null) { - criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); - } - if (StringUtils.isNotBlank(MapUtils.getString(param, "agentNo"))) { criteria.andAgentNoLike("%" + MapUtils.getString(param, "agentNo") + "%"); } diff --git a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentStaffServiceImpl.java b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentStaffServiceImpl.java new file mode 100644 index 0000000..d4e34f3 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentStaffServiceImpl.java @@ -0,0 +1,169 @@ +package com.hfkj.service.agent.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.BsAgentStaffMapper; +import com.hfkj.entity.BsAgentStaff; +import com.hfkj.entity.BsAgentStaffExample; +import com.hfkj.entity.SecUser; +import com.hfkj.service.agent.BsAgentStaffService; +import com.hfkj.service.sec.SecUserService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import com.hfkj.sysenum.SecUserStatusEnum; +import com.hfkj.sysenum.agent.AgentStaffStatusEnum; +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; + +/** + * @className: BsAgentStaffServiceImpl + * @author: HuRui + * @date: 2024/6/17 + **/ +@Service("agentStaffService") +public class BsAgentStaffServiceImpl implements BsAgentStaffService { + @Resource + private BsAgentStaffMapper agentStaffMapper; + + @Resource + private SecUserService userService; + @Override + public void editData(BsAgentStaff agentStaff) { + if (agentStaff.getId() == null) { + agentStaff.setCreateTime(new Date()); + agentStaff.setUpdateTime(new Date()); + agentStaffMapper.insert(agentStaff); + } else { + agentStaff.setUpdateTime(new Date()); + agentStaffMapper.updateByPrimaryKey(agentStaff); + } + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void addStaff(BsAgentStaff agentStaff) throws Exception { + if (userService.getDetailByLoginName(agentStaff.getTelephone()) != null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "电话已存在,请更换"); + } + agentStaff.setStatus(AgentStaffStatusEnum.status1.getStatus()); + editData(agentStaff); + + SecUser secUser = new SecUser(); + secUser.setAvatar(agentStaff.getAvatar()); + secUser.setUserName(agentStaff.getName()); + secUser.setLoginName(agentStaff.getTelephone()); + secUser.setPassword(MD5Util.encode("123456".getBytes())); + secUser.setStatus(1); + secUser.setRoleId(6L); + secUser.setObjectType(SecUserObjectTypeEnum.type5.getCode()); + secUser.setObjectId(agentStaff.getId()); + secUser.setCreateTime(new Date()); + secUser.setUpdateTime(new Date()); + userService.editUser(secUser); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void updateStaff(BsAgentStaff gasStaff) { + // 查询账户 + SecUser account = userService.getDetail(SecUserObjectTypeEnum.type5, gasStaff.getId()); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户信息"); + } + if (!account.getLoginName().equals(gasStaff.getTelephone())) { + if (userService.getDetailByLoginName(gasStaff.getTelephone()) != null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号已存在,请更换"); + } + account.setLoginName(gasStaff.getTelephone()); + } + editData(gasStaff); + + account.setUserName(gasStaff.getName()); + userService.editUser(account); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void delStaff(Long id) { + BsAgentStaff agentStaff = getStaffDetailById(id); + if (agentStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到工作人员"); + } + agentStaff.setStatus(AgentStaffStatusEnum.status0.getStatus()); + editData(agentStaff); + + // 查询账户 + SecUser account = userService.getDetail(SecUserObjectTypeEnum.type5, agentStaff.getId()); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户"); + } + account.setStatus(SecUserStatusEnum.status0.getCode()); + userService.editUser(account); + } + + @Override + public void staffPwdReset(Long id) { + try { + BsAgentStaff staff = getStaffDetailById(id); + if (staff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到工作人员信息"); + } + // 查询账户 + SecUser account = userService.getDetail(SecUserObjectTypeEnum.type5, staff.getId()); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到工作人员账户信息"); + } + account.setPassword(MD5Util.encode("123456".getBytes())); + userService.editUser(account); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public BsAgentStaff getStaffDetailById(Long id) { + return agentStaffMapper.selectByPrimaryKey(id); + } + + @Override + public List getStaffList(Map param) { + BsAgentStaffExample example = new BsAgentStaffExample(); + BsAgentStaffExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "agentId") != null) { + criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId")); + } + + 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, "status") != null) { + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); + } + + example.setOrderByClause("create_time desc"); + return agentStaffMapper.selectByExample(example); + } + + @Override + public List getStaffList(Long agentId) { + BsAgentStaffExample example = new BsAgentStaffExample(); + example.createCriteria().andAgentIdEqualTo(agentId).andStatusNotEqualTo(0); + return agentStaffMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/sysenum/agent/AgentStaffStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/agent/AgentStaffStatusEnum.java new file mode 100644 index 0000000..61c0f7c --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/agent/AgentStaffStatusEnum.java @@ -0,0 +1,34 @@ +package com.hfkj.sysenum.agent; + +import lombok.Getter; + +/** + * 代理商工作人员状态 + * @author hurui + */ +@Getter +public enum AgentStaffStatusEnum { + /** + * 删除 + */ + status0(0 , "删除"), + /** + * 正常 + */ + status1(1 , "正常"), + /** + * 禁用 + */ + status2(2 , "禁用"), + ; + + private Integer status; + + private String name; + + AgentStaffStatusEnum(int status , String name) { + this.status = status; + this.name = name; + } + +}