diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java index ff455ce6..cabe8b53 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -14,6 +14,7 @@ import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighMerchant; import com.hai.entity.HighMerchantStore; import com.hai.entity.SecRegion; +import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.CommonService; import com.hai.service.HighMerchantService; @@ -76,25 +77,17 @@ public class HighMerchantStoreController { } if (highMerchantStore.getRegionId() == null - || StringUtils.isBlank(highMerchantStore.getStoreKey()) || StringUtils.isBlank(highMerchantStore.getStoreName()) + || StringUtils.isBlank(highMerchantStore.getContactName()) || StringUtils.isBlank(highMerchantStore.getTelephone()) || StringUtils.isBlank(highMerchantStore.getAddress()) || StringUtils.isBlank(highMerchantStore.getLatitude()) || StringUtils.isBlank(highMerchantStore.getLongitude()) - || StringUtils.isBlank(highMerchantStore.getSecUser().getPassword()) - || StringUtils.isBlank(highMerchantStore.getSecUser().getTelephone()) ) { log.error("HighMerchantStoreController -> insertMerchantStore() error!","参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } - // 校验账号手机号是否存在 - if (secUserService.findByPhone(highMerchantStore.getSecUser().getTelephone()) != null) { - log.error("HighMerchantStoreController --> insertMerchantStore() error!", "联系方式已被使用"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.TEL_EXISTED, ""); - } - // 校验商户 HighMerchant merchant = highMerchantService.getMerchantById(userInfoModel.getMerchant().getId()); if (merchant == null) { @@ -107,11 +100,15 @@ public class HighMerchantStoreController { if (regionMap.get("region").getRegionId().intValue() == 500100) { highMerchantStore.setRegionId(regionMap.get("region").getParentId()); highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); - } else { highMerchantStore.setRegionId(regionMap.get("region").getRegionId()); highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); } + + if (highMerchantStore.getBrandId() != null) { + highMerchantStore.setBrandName(commonService.getDictionaryCodeName("MERCHANT_STORE_BRANCH", highMerchantStore.getBrandId().toString())); + } + highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setStatus(1); // 状态:0:删除,1:正常 @@ -119,6 +116,7 @@ public class HighMerchantStoreController { highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setOperatorId(userInfoModel.getSecUser().getId()); highMerchantStore.setOperatorName(userInfoModel.getSecUser().getUserName()); + highMerchantStore.setSourceType(MerchantStoreSourceType.type1.getNumber()); highMerchantStoreService.insertMerchantStore(highMerchantStore); return ResponseMsgUtil.success(highMerchantStore); @@ -180,13 +178,12 @@ public class HighMerchantStoreController { if (highMerchantStore.getRegionId() == null || highMerchantStore.getId() == null - || StringUtils.isBlank(highMerchantStore.getStoreKey()) || StringUtils.isBlank(highMerchantStore.getStoreName()) + || StringUtils.isBlank(highMerchantStore.getContactName()) || StringUtils.isBlank(highMerchantStore.getTelephone()) || StringUtils.isBlank(highMerchantStore.getAddress()) || StringUtils.isBlank(highMerchantStore.getLatitude()) || StringUtils.isBlank(highMerchantStore.getLongitude()) - || StringUtils.isBlank(highMerchantStore.getSecUser().getTelephone()) ) { log.error("HighMerchantStoreController -> insertMerchantStore() error!","参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); @@ -195,40 +192,41 @@ public class HighMerchantStoreController { // 查询门店 HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highMerchantStore.getId()); if (store == null) { - log.error("BsStudentController --> addStudent() error!", "请输入正确的电话号码"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR, ""); - } - - // 校验账号手机号是否存在 - if (!store.getSecUser().getTelephone().equals(highMerchantStore.getSecUser().getTelephone()) - && secUserService.findByPhone(highMerchantStore.getSecUser().getTelephone()) != null) { - log.error("BsStudentController --> addStudent() error!", "电话号码已被使用"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.TEL_EXISTED, ""); - } - - // 校验商户 - HighMerchant merchant = highMerchantService.getMerchantById(highMerchantStore.getMerchantId()); - if (merchant == null) { - log.error("HighMerchantStoreController -> editMerchantStore() error!","未找到商户"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); + log.error("BsStudentController --> addStudent() error!", "未找到门店信息"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息"); } - Map regionMap = commonService.getParentInfoByRegionId(highMerchantStore.getRegionId()); // 如果是重庆市的区县,使用重庆市的区域代码 if (regionMap.get("region").getRegionId().intValue() == 500100) { - highMerchantStore.setRegionId(regionMap.get("region").getParentId()); - highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); - + store.setRegionId(regionMap.get("region").getParentId()); + store.setRegionName(regionMap.get("region").getRegionName()); } else { - highMerchantStore.setRegionId(regionMap.get("region").getRegionId()); - highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); + store.setRegionId(regionMap.get("region").getRegionId()); + store.setRegionName(regionMap.get("region").getRegionName()); } - highMerchantStore.setUpdateTime(new Date()); - highMerchantStore.setOperatorId(userInfoModel.getSecUser().getId()); - highMerchantStore.setOperatorName(userInfoModel.getSecUser().getUserName()); - highMerchantStoreService.updateMerchantStore(highMerchantStore); - return ResponseMsgUtil.success(highMerchantStore); + if (highMerchantStore.getBrandId() != null) { + store.setBrandId(highMerchantStore.getBrandId()); + store.setBrandName(commonService.getDictionaryCodeName("MERCHANT_STORE_BRANCH", highMerchantStore.getBrandId().toString())); + } + store.setType(highMerchantStore.getType()); + store.setStoreLogo(highMerchantStore.getStoreLogo()); + store.setStoreName(highMerchantStore.getStoreName()); + store.setContactName(highMerchantStore.getContactName()); + store.setTelephone(highMerchantStore.getTelephone()); + store.setAddress(highMerchantStore.getAddress()); + store.setLatitude(highMerchantStore.getLatitude()); + store.setLongitude(highMerchantStore.getLongitude()); + store.setDeviceSn(highMerchantStore.getDeviceSn()); + store.setDeviceKey(highMerchantStore.getDeviceKey()); + store.setDeviceName(highMerchantStore.getDeviceName()); + + store.setUpdateTime(new Date()); + store.setOperatorId(userInfoModel.getSecUser().getId()); + store.setOperatorName(userInfoModel.getSecUser().getUserName()); + highMerchantStoreService.updateMerchantStore(store); + + return ResponseMsgUtil.success(store); } catch (Exception e) { log.error("HighMerchantStoreController -> editMerchantStore() error!",e); return ResponseMsgUtil.exception(e); diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantStoreMapper.java b/hai-service/src/main/java/com/hai/dao/HighMerchantStoreMapper.java index abe17ffc..d7643d43 100644 --- a/hai-service/src/main/java/com/hai/dao/HighMerchantStoreMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantStoreMapper.java @@ -39,26 +39,34 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_merchant_store (`type`, region_id, ", - "region_name, company_id, ", - "merchant_id, store_logo, ", - "store_key, store_name, ", - "store_desc, telephone, ", + "insert into high_merchant_store (`type`, source_type, ", + "brand_id, brand_name, ", + "region_id, region_name, ", + "company_id, merchant_id, ", + "store_logo, store_key, ", + "store_name, store_desc, ", + "telephone, contact_name, ", "address, `status`, ", "longitude, latitude, ", - "operator_id, operator_name, ", - "update_time, create_time, ", - "ext_1, ext_2, ext_3)", - "values (#{type,jdbcType=INTEGER}, #{regionId,jdbcType=BIGINT}, ", - "#{regionName,jdbcType=VARCHAR}, #{companyId,jdbcType=BIGINT}, ", - "#{merchantId,jdbcType=BIGINT}, #{storeLogo,jdbcType=VARCHAR}, ", - "#{storeKey,jdbcType=VARCHAR}, #{storeName,jdbcType=VARCHAR}, ", - "#{storeDesc,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, ", + "device_sn, device_key, ", + "device_name, operator_id, ", + "operator_name, update_time, ", + "create_time, ext_1, ", + "ext_2, ext_3)", + "values (#{type,jdbcType=INTEGER}, #{sourceType,jdbcType=INTEGER}, ", + "#{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, ", + "#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", + "#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ", + "#{storeLogo,jdbcType=VARCHAR}, #{storeKey,jdbcType=VARCHAR}, ", + "#{storeName,jdbcType=VARCHAR}, #{storeDesc,jdbcType=VARCHAR}, ", + "#{telephone,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, ", "#{address,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ", - "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{deviceSn,jdbcType=VARCHAR}, #{deviceKey,jdbcType=VARCHAR}, ", + "#{deviceName,jdbcType=VARCHAR}, #{operatorId,jdbcType=BIGINT}, ", + "#{operatorName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighMerchantStore record); @@ -71,6 +79,9 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="brand_id", property="brandId", jdbcType=JdbcType.BIGINT), + @Result(column="brand_name", property="brandName", jdbcType=JdbcType.VARCHAR), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @@ -80,10 +91,14 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="store_desc", property="storeDesc", jdbcType=JdbcType.VARCHAR), @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR), @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="device_key", property="deviceKey", jdbcType=JdbcType.VARCHAR), + @Result(column="device_name", property="deviceName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @@ -96,15 +111,19 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { @Select({ "select", - "id, `type`, region_id, region_name, company_id, merchant_id, store_logo, store_key, ", - "store_name, store_desc, telephone, address, `status`, longitude, latitude, operator_id, ", - "operator_name, update_time, create_time, ext_1, ext_2, ext_3", + "id, `type`, source_type, brand_id, brand_name, region_id, region_name, company_id, ", + "merchant_id, store_logo, store_key, store_name, store_desc, telephone, contact_name, ", + "address, `status`, longitude, latitude, device_sn, device_key, device_name, ", + "operator_id, operator_name, update_time, create_time, ext_1, ext_2, ext_3", "from high_merchant_store", "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="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="brand_id", property="brandId", jdbcType=JdbcType.BIGINT), + @Result(column="brand_name", property="brandName", jdbcType=JdbcType.VARCHAR), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @@ -114,10 +133,14 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="store_desc", property="storeDesc", jdbcType=JdbcType.VARCHAR), @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR), @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="device_key", property="deviceKey", jdbcType=JdbcType.VARCHAR), + @Result(column="device_name", property="deviceName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @@ -140,6 +163,9 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { @Update({ "update high_merchant_store", "set `type` = #{type,jdbcType=INTEGER},", + "source_type = #{sourceType,jdbcType=INTEGER},", + "brand_id = #{brandId,jdbcType=BIGINT},", + "brand_name = #{brandName,jdbcType=VARCHAR},", "region_id = #{regionId,jdbcType=BIGINT},", "region_name = #{regionName,jdbcType=VARCHAR},", "company_id = #{companyId,jdbcType=BIGINT},", @@ -149,10 +175,14 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt { "store_name = #{storeName,jdbcType=VARCHAR},", "store_desc = #{storeDesc,jdbcType=VARCHAR},", "telephone = #{telephone,jdbcType=VARCHAR},", + "contact_name = #{contactName,jdbcType=VARCHAR},", "address = #{address,jdbcType=VARCHAR},", "`status` = #{status,jdbcType=INTEGER},", "longitude = #{longitude,jdbcType=VARCHAR},", "latitude = #{latitude,jdbcType=VARCHAR},", + "device_sn = #{deviceSn,jdbcType=VARCHAR},", + "device_key = #{deviceKey,jdbcType=VARCHAR},", + "device_name = #{deviceName,jdbcType=VARCHAR},", "operator_id = #{operatorId,jdbcType=BIGINT},", "operator_name = #{operatorName,jdbcType=VARCHAR},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantStoreSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighMerchantStoreSqlProvider.java index de41c143..3e0ad5cc 100644 --- a/hai-service/src/main/java/com/hai/dao/HighMerchantStoreSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantStoreSqlProvider.java @@ -32,6 +32,18 @@ public class HighMerchantStoreSqlProvider { sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); } + if (record.getSourceType() != null) { + sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); + } + + if (record.getBrandId() != null) { + sql.VALUES("brand_id", "#{brandId,jdbcType=BIGINT}"); + } + + if (record.getBrandName() != null) { + sql.VALUES("brand_name", "#{brandName,jdbcType=VARCHAR}"); + } + if (record.getRegionId() != null) { sql.VALUES("region_id", "#{regionId,jdbcType=BIGINT}"); } @@ -68,6 +80,10 @@ public class HighMerchantStoreSqlProvider { sql.VALUES("telephone", "#{telephone,jdbcType=VARCHAR}"); } + if (record.getContactName() != null) { + sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); + } + if (record.getAddress() != null) { sql.VALUES("address", "#{address,jdbcType=VARCHAR}"); } @@ -84,6 +100,18 @@ public class HighMerchantStoreSqlProvider { sql.VALUES("latitude", "#{latitude,jdbcType=VARCHAR}"); } + if (record.getDeviceSn() != null) { + sql.VALUES("device_sn", "#{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getDeviceKey() != null) { + sql.VALUES("device_key", "#{deviceKey,jdbcType=VARCHAR}"); + } + + if (record.getDeviceName() != null) { + sql.VALUES("device_name", "#{deviceName,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); } @@ -123,6 +151,9 @@ public class HighMerchantStoreSqlProvider { sql.SELECT("id"); } sql.SELECT("`type`"); + sql.SELECT("source_type"); + sql.SELECT("brand_id"); + sql.SELECT("brand_name"); sql.SELECT("region_id"); sql.SELECT("region_name"); sql.SELECT("company_id"); @@ -132,10 +163,14 @@ public class HighMerchantStoreSqlProvider { sql.SELECT("store_name"); sql.SELECT("store_desc"); sql.SELECT("telephone"); + sql.SELECT("contact_name"); sql.SELECT("address"); sql.SELECT("`status`"); sql.SELECT("longitude"); sql.SELECT("latitude"); + sql.SELECT("device_sn"); + sql.SELECT("device_key"); + sql.SELECT("device_name"); sql.SELECT("operator_id"); sql.SELECT("operator_name"); sql.SELECT("update_time"); @@ -168,6 +203,18 @@ public class HighMerchantStoreSqlProvider { sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); } + if (record.getSourceType() != null) { + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + } + + if (record.getBrandId() != null) { + sql.SET("brand_id = #{record.brandId,jdbcType=BIGINT}"); + } + + if (record.getBrandName() != null) { + sql.SET("brand_name = #{record.brandName,jdbcType=VARCHAR}"); + } + if (record.getRegionId() != null) { sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); } @@ -204,6 +251,10 @@ public class HighMerchantStoreSqlProvider { sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); } + if (record.getContactName() != null) { + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + } + if (record.getAddress() != null) { sql.SET("address = #{record.address,jdbcType=VARCHAR}"); } @@ -220,6 +271,18 @@ public class HighMerchantStoreSqlProvider { sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}"); } + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getDeviceKey() != null) { + sql.SET("device_key = #{record.deviceKey,jdbcType=VARCHAR}"); + } + + if (record.getDeviceName() != null) { + sql.SET("device_name = #{record.deviceName,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); } @@ -258,6 +321,9 @@ public class HighMerchantStoreSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + sql.SET("brand_id = #{record.brandId,jdbcType=BIGINT}"); + sql.SET("brand_name = #{record.brandName,jdbcType=VARCHAR}"); sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); @@ -267,10 +333,14 @@ public class HighMerchantStoreSqlProvider { sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); sql.SET("store_desc = #{record.storeDesc,jdbcType=VARCHAR}"); sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); sql.SET("address = #{record.address,jdbcType=VARCHAR}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("longitude = #{record.longitude,jdbcType=VARCHAR}"); sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}"); + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + sql.SET("device_key = #{record.deviceKey,jdbcType=VARCHAR}"); + sql.SET("device_name = #{record.deviceName,jdbcType=VARCHAR}"); sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); @@ -292,6 +362,18 @@ public class HighMerchantStoreSqlProvider { sql.SET("`type` = #{type,jdbcType=INTEGER}"); } + if (record.getSourceType() != null) { + sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); + } + + if (record.getBrandId() != null) { + sql.SET("brand_id = #{brandId,jdbcType=BIGINT}"); + } + + if (record.getBrandName() != null) { + sql.SET("brand_name = #{brandName,jdbcType=VARCHAR}"); + } + if (record.getRegionId() != null) { sql.SET("region_id = #{regionId,jdbcType=BIGINT}"); } @@ -328,6 +410,10 @@ public class HighMerchantStoreSqlProvider { sql.SET("telephone = #{telephone,jdbcType=VARCHAR}"); } + if (record.getContactName() != null) { + sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); + } + if (record.getAddress() != null) { sql.SET("address = #{address,jdbcType=VARCHAR}"); } @@ -344,6 +430,18 @@ public class HighMerchantStoreSqlProvider { sql.SET("latitude = #{latitude,jdbcType=VARCHAR}"); } + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getDeviceKey() != null) { + sql.SET("device_key = #{deviceKey,jdbcType=VARCHAR}"); + } + + if (record.getDeviceName() != null) { + sql.SET("device_name = #{deviceName,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java index a230adb3..80a5e4c2 100644 --- a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java @@ -19,10 +19,25 @@ public class HighMerchantStore implements Serializable { private Long id; /** - * 类型 1:团油门店 + * 类型 1:加油站 */ private Integer type; + /** + * 来源类型 1:平台自建 2:团油 + */ + private Integer sourceType; + + /** + * 品牌id + */ + private Long brandId; + + /** + * 品牌名称 + */ + private String brandName; + /** * 区域 */ @@ -64,10 +79,15 @@ public class HighMerchantStore implements Serializable { private String storeDesc; /** - * 电话 + * 联系电话 */ private String telephone; + /** + * 联系人 + */ + private String contactName; + /** * 商户地址 */ @@ -88,6 +108,21 @@ public class HighMerchantStore implements Serializable { */ private String latitude; + /** + * 设备SN号 + */ + private String deviceSn; + + /** + * 设备Key号 + */ + private String deviceKey; + + /** + * 设备名称 + */ + private String deviceName; + /** * 操作人id */ @@ -118,8 +153,6 @@ public class HighMerchantStore implements Serializable { private HighMerchant highMerchant; - private static final long serialVersionUID = 1L; - public Double getDistance() { return distance; } @@ -136,6 +169,8 @@ public class HighMerchantStore implements Serializable { this.highMerchant = highMerchant; } + private static final long serialVersionUID = 1L; + public Long getId() { return id; } @@ -152,6 +187,30 @@ public class HighMerchantStore implements Serializable { this.type = type; } + public Integer getSourceType() { + return sourceType; + } + + public void setSourceType(Integer sourceType) { + this.sourceType = sourceType; + } + + public Long getBrandId() { + return brandId; + } + + public void setBrandId(Long brandId) { + this.brandId = brandId; + } + + public String getBrandName() { + return brandName; + } + + public void setBrandName(String brandName) { + this.brandName = brandName; + } + public Long getRegionId() { return regionId; } @@ -224,6 +283,14 @@ public class HighMerchantStore implements Serializable { this.telephone = telephone; } + public String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + public String getAddress() { return address; } @@ -256,6 +323,30 @@ public class HighMerchantStore implements Serializable { this.latitude = latitude; } + public String getDeviceSn() { + return deviceSn; + } + + public void setDeviceSn(String deviceSn) { + this.deviceSn = deviceSn; + } + + public String getDeviceKey() { + return deviceKey; + } + + public void setDeviceKey(String deviceKey) { + this.deviceKey = deviceKey; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + public Long getOperatorId() { return operatorId; } @@ -326,6 +417,9 @@ public class HighMerchantStore implements Serializable { HighMerchantStore other = (HighMerchantStore) 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.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) + && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId())) + && (this.getBrandName() == null ? other.getBrandName() == null : this.getBrandName().equals(other.getBrandName())) && (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) && (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) @@ -335,10 +429,14 @@ public class HighMerchantStore implements Serializable { && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) && (this.getStoreDesc() == null ? other.getStoreDesc() == null : this.getStoreDesc().equals(other.getStoreDesc())) && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone())) + && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude())) && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude())) + && (this.getDeviceSn() == null ? other.getDeviceSn() == null : this.getDeviceSn().equals(other.getDeviceSn())) + && (this.getDeviceKey() == null ? other.getDeviceKey() == null : this.getDeviceKey().equals(other.getDeviceKey())) + && (this.getDeviceName() == null ? other.getDeviceName() == null : this.getDeviceName().equals(other.getDeviceName())) && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) @@ -354,6 +452,9 @@ public class HighMerchantStore implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); + result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode()); + result = prime * result + ((getBrandName() == null) ? 0 : getBrandName().hashCode()); result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); @@ -363,10 +464,14 @@ public class HighMerchantStore implements Serializable { result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); result = prime * result + ((getStoreDesc() == null) ? 0 : getStoreDesc().hashCode()); result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode()); + result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode()); result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode()); + result = prime * result + ((getDeviceSn() == null) ? 0 : getDeviceSn().hashCode()); + result = prime * result + ((getDeviceKey() == null) ? 0 : getDeviceKey().hashCode()); + result = prime * result + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); @@ -385,6 +490,9 @@ public class HighMerchantStore implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", type=").append(type); + sb.append(", sourceType=").append(sourceType); + sb.append(", brandId=").append(brandId); + sb.append(", brandName=").append(brandName); sb.append(", regionId=").append(regionId); sb.append(", regionName=").append(regionName); sb.append(", companyId=").append(companyId); @@ -394,10 +502,14 @@ public class HighMerchantStore implements Serializable { sb.append(", storeName=").append(storeName); sb.append(", storeDesc=").append(storeDesc); sb.append(", telephone=").append(telephone); + sb.append(", contactName=").append(contactName); sb.append(", address=").append(address); sb.append(", status=").append(status); sb.append(", longitude=").append(longitude); sb.append(", latitude=").append(latitude); + sb.append(", deviceSn=").append(deviceSn); + sb.append(", deviceKey=").append(deviceKey); + sb.append(", deviceName=").append(deviceName); sb.append(", operatorId=").append(operatorId); sb.append(", operatorName=").append(operatorName); sb.append(", updateTime=").append(updateTime); @@ -409,4 +521,4 @@ public class HighMerchantStore implements Serializable { sb.append("]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantStoreExample.java b/hai-service/src/main/java/com/hai/entity/HighMerchantStoreExample.java index 56398e5e..fca5750f 100644 --- a/hai-service/src/main/java/com/hai/entity/HighMerchantStoreExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantStoreExample.java @@ -245,6 +245,196 @@ public class HighMerchantStoreExample { return (Criteria) this; } + public Criteria andSourceTypeIsNull() { + addCriterion("source_type is null"); + return (Criteria) this; + } + + public Criteria andSourceTypeIsNotNull() { + addCriterion("source_type is not null"); + return (Criteria) this; + } + + public Criteria andSourceTypeEqualTo(Integer value) { + addCriterion("source_type =", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotEqualTo(Integer value) { + addCriterion("source_type <>", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThan(Integer value) { + addCriterion("source_type >", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("source_type >=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThan(Integer value) { + addCriterion("source_type <", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThanOrEqualTo(Integer value) { + addCriterion("source_type <=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeIn(List values) { + addCriterion("source_type in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotIn(List values) { + addCriterion("source_type not in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeBetween(Integer value1, Integer value2) { + addCriterion("source_type between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) { + addCriterion("source_type not between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andBrandIdIsNull() { + addCriterion("brand_id is null"); + return (Criteria) this; + } + + public Criteria andBrandIdIsNotNull() { + addCriterion("brand_id is not null"); + return (Criteria) this; + } + + public Criteria andBrandIdEqualTo(Long value) { + addCriterion("brand_id =", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdNotEqualTo(Long value) { + addCriterion("brand_id <>", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdGreaterThan(Long value) { + addCriterion("brand_id >", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdGreaterThanOrEqualTo(Long value) { + addCriterion("brand_id >=", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdLessThan(Long value) { + addCriterion("brand_id <", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdLessThanOrEqualTo(Long value) { + addCriterion("brand_id <=", value, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdIn(List values) { + addCriterion("brand_id in", values, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdNotIn(List values) { + addCriterion("brand_id not in", values, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdBetween(Long value1, Long value2) { + addCriterion("brand_id between", value1, value2, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandIdNotBetween(Long value1, Long value2) { + addCriterion("brand_id not between", value1, value2, "brandId"); + return (Criteria) this; + } + + public Criteria andBrandNameIsNull() { + addCriterion("brand_name is null"); + return (Criteria) this; + } + + public Criteria andBrandNameIsNotNull() { + addCriterion("brand_name is not null"); + return (Criteria) this; + } + + public Criteria andBrandNameEqualTo(String value) { + addCriterion("brand_name =", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameNotEqualTo(String value) { + addCriterion("brand_name <>", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameGreaterThan(String value) { + addCriterion("brand_name >", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameGreaterThanOrEqualTo(String value) { + addCriterion("brand_name >=", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameLessThan(String value) { + addCriterion("brand_name <", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameLessThanOrEqualTo(String value) { + addCriterion("brand_name <=", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameLike(String value) { + addCriterion("brand_name like", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameNotLike(String value) { + addCriterion("brand_name not like", value, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameIn(List values) { + addCriterion("brand_name in", values, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameNotIn(List values) { + addCriterion("brand_name not in", values, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameBetween(String value1, String value2) { + addCriterion("brand_name between", value1, value2, "brandName"); + return (Criteria) this; + } + + public Criteria andBrandNameNotBetween(String value1, String value2) { + addCriterion("brand_name not between", value1, value2, "brandName"); + return (Criteria) this; + } + public Criteria andRegionIdIsNull() { addCriterion("region_id is null"); return (Criteria) this; @@ -845,6 +1035,76 @@ public class HighMerchantStoreExample { return (Criteria) this; } + public Criteria andContactNameIsNull() { + addCriterion("contact_name is null"); + return (Criteria) this; + } + + public Criteria andContactNameIsNotNull() { + addCriterion("contact_name is not null"); + return (Criteria) this; + } + + public Criteria andContactNameEqualTo(String value) { + addCriterion("contact_name =", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotEqualTo(String value) { + addCriterion("contact_name <>", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThan(String value) { + addCriterion("contact_name >", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThanOrEqualTo(String value) { + addCriterion("contact_name >=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThan(String value) { + addCriterion("contact_name <", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThanOrEqualTo(String value) { + addCriterion("contact_name <=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLike(String value) { + addCriterion("contact_name like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotLike(String value) { + addCriterion("contact_name not like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameIn(List values) { + addCriterion("contact_name in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotIn(List values) { + addCriterion("contact_name not in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameBetween(String value1, String value2) { + addCriterion("contact_name between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotBetween(String value1, String value2) { + addCriterion("contact_name not between", value1, value2, "contactName"); + return (Criteria) this; + } + public Criteria andAddressIsNull() { addCriterion("address is null"); return (Criteria) this; @@ -1115,6 +1375,216 @@ public class HighMerchantStoreExample { return (Criteria) this; } + public Criteria andDeviceSnIsNull() { + addCriterion("device_sn is null"); + return (Criteria) this; + } + + public Criteria andDeviceSnIsNotNull() { + addCriterion("device_sn is not null"); + return (Criteria) this; + } + + public Criteria andDeviceSnEqualTo(String value) { + addCriterion("device_sn =", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotEqualTo(String value) { + addCriterion("device_sn <>", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThan(String value) { + addCriterion("device_sn >", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThanOrEqualTo(String value) { + addCriterion("device_sn >=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThan(String value) { + addCriterion("device_sn <", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThanOrEqualTo(String value) { + addCriterion("device_sn <=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLike(String value) { + addCriterion("device_sn like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotLike(String value) { + addCriterion("device_sn not like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnIn(List values) { + addCriterion("device_sn in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotIn(List values) { + addCriterion("device_sn not in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnBetween(String value1, String value2) { + addCriterion("device_sn between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotBetween(String value1, String value2) { + addCriterion("device_sn not between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceKeyIsNull() { + addCriterion("device_key is null"); + return (Criteria) this; + } + + public Criteria andDeviceKeyIsNotNull() { + addCriterion("device_key is not null"); + return (Criteria) this; + } + + public Criteria andDeviceKeyEqualTo(String value) { + addCriterion("device_key =", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyNotEqualTo(String value) { + addCriterion("device_key <>", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyGreaterThan(String value) { + addCriterion("device_key >", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyGreaterThanOrEqualTo(String value) { + addCriterion("device_key >=", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyLessThan(String value) { + addCriterion("device_key <", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyLessThanOrEqualTo(String value) { + addCriterion("device_key <=", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyLike(String value) { + addCriterion("device_key like", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyNotLike(String value) { + addCriterion("device_key not like", value, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyIn(List values) { + addCriterion("device_key in", values, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyNotIn(List values) { + addCriterion("device_key not in", values, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyBetween(String value1, String value2) { + addCriterion("device_key between", value1, value2, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceKeyNotBetween(String value1, String value2) { + addCriterion("device_key not between", value1, value2, "deviceKey"); + return (Criteria) this; + } + + public Criteria andDeviceNameIsNull() { + addCriterion("device_name is null"); + return (Criteria) this; + } + + public Criteria andDeviceNameIsNotNull() { + addCriterion("device_name is not null"); + return (Criteria) this; + } + + public Criteria andDeviceNameEqualTo(String value) { + addCriterion("device_name =", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameNotEqualTo(String value) { + addCriterion("device_name <>", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameGreaterThan(String value) { + addCriterion("device_name >", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameGreaterThanOrEqualTo(String value) { + addCriterion("device_name >=", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameLessThan(String value) { + addCriterion("device_name <", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameLessThanOrEqualTo(String value) { + addCriterion("device_name <=", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameLike(String value) { + addCriterion("device_name like", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameNotLike(String value) { + addCriterion("device_name not like", value, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameIn(List values) { + addCriterion("device_name in", values, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameNotIn(List values) { + addCriterion("device_name not in", values, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameBetween(String value1, String value2) { + addCriterion("device_name between", value1, value2, "deviceName"); + return (Criteria) this; + } + + public Criteria andDeviceNameNotBetween(String value1, String value2) { + addCriterion("device_name not between", value1, value2, "deviceName"); + return (Criteria) this; + } + public Criteria andOperatorIdIsNull() { addCriterion("operator_id is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java new file mode 100644 index 00000000..0089476b --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java @@ -0,0 +1,36 @@ +package com.hai.enum_type; + +/** + * 门店来源 + * @author hurui + */ +public enum MerchantStoreSourceType { + type1(1, "平台自建"), + type2(2, "团油门店"), + ; + + private Integer number; + + private String name; + + MerchantStoreSourceType(int number, String name) { + this.number = number; + this.name = name; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java index 966ca502..df3ec7b1 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java @@ -43,18 +43,14 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { @Transactional(propagation= Propagation.REQUIRES_NEW) public void insertMerchantStore(HighMerchantStoreModel highMerchantStore) throws Exception { highMerchantStoreMapper.insert(highMerchantStore); + Long storeKey = 11000000 + highMerchantStore.getId(); + highMerchantStore.setStoreKey(storeKey.toString()); + highMerchantStoreMapper.updateByPrimaryKey(highMerchantStore); - if (highMerchantStore.getSecUser() == null) { - highMerchantStore.setSecUser(new SecUser()); - } + highMerchantStore.setSecUser(new SecUser()); highMerchantStore.getSecUser().setUserName(highMerchantStore.getStoreName()); - if (StringUtils.isNotBlank(highMerchantStore.getSecUser().getTelephone())) { - highMerchantStore.getSecUser().setLoginName(highMerchantStore.getSecUser().getTelephone()); - highMerchantStore.getSecUser().setPassword(MD5Util.encode(highMerchantStore.getSecUser().getPassword().getBytes())); - } else { - highMerchantStore.getSecUser().setLoginName(highMerchantStore.getStoreKey()); - highMerchantStore.getSecUser().setPassword(MD5Util.encode("123456".getBytes())); - } + highMerchantStore.getSecUser().setLoginName(highMerchantStore.getStoreKey()); + highMerchantStore.getSecUser().setPassword(MD5Util.encode("123456".getBytes())); highMerchantStore.getSecUser().setAdminFlag(1); highMerchantStore.getSecUser().setStatus(1); highMerchantStore.getSecUser().setRoleId(4L); @@ -75,19 +71,8 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { @Override @Transactional - public void updateMerchantStore(HighMerchantStoreModel highMerchantStore) throws Exception { + public void updateMerchantStore(HighMerchantStoreModel highMerchantStore) { highMerchantStoreMapper.updateByPrimaryKey(highMerchantStore); - - // 查询主账号 - SecUser mainAccount = secUserService.getMainAccount(3, highMerchantStore.getId()); - if (mainAccount != null) { - String userPass = MD5Util.encode(highMerchantStore.getSecUser().getPassword().getBytes()); - if (!mainAccount.getPassword().equals(userPass)) { - mainAccount.setPassword(userPass); - } - mainAccount.setTelephone(highMerchantStore.getTelephone()); - secUserService.updateUser(mainAccount); - } } @Override