提交代码

dev-discount
胡锐 3 years ago
parent a6282477a6
commit 12d9b99d89
  1. 13
      hai-bweb/src/main/java/com/bweb/controller/CommonController.java
  2. 32
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  3. 31
      hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceTaskController.java
  4. 9
      hai-service/src/main/java/com/hai/common/utils/DateUtil.java
  5. 43
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java
  6. 14
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java
  7. 18
      hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java
  8. 70
      hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java
  9. 6
      hai-service/src/main/java/com/hai/service/CommonService.java
  10. 5
      hai-service/src/main/java/com/hai/service/impl/BsCompanyServiceImpl.java
  11. 7
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java
  12. 11
      hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java
  13. 8
      hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java

@ -38,6 +38,19 @@ public class CommonController {
private SecConfigService secConfigService; private SecConfigService secConfigService;
@RequestMapping(value="/getProvinceList",method= RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询省级列表")
public ResponseData getProvinceList(){
try {
return ResponseMsgUtil.success(commonService.getProvinceList());
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getRegionsByParentId",method= RequestMethod.GET) @RequestMapping(value="/getRegionsByParentId",method= RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "分级查询区域信息") @ApiOperation(value = "分级查询区域信息")

@ -190,6 +190,38 @@ public class HighGasController {
} }
} }
@RequestMapping(value="/getGasSelectList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油站选择列表")
public ResponseData getGasSelectList() {
try {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel == null) {
log.error("HighGasController -> disabledOil() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
Map<String, Object> param = new HashMap<>();
param.put("type", 1);
param.put("sourceType", 1);
param.put("status", 1);
if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) {
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) {
param.put("companyId", userInfoModel.getBsCompany().getId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
return ResponseMsgUtil.success(merchantStoreService.getMerchantStoreList(param));
} catch (Exception e) {
log.error("HighGasController -> getGasSelectList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/exportGasOrder",method = RequestMethod.GET) @RequestMapping(value="/exportGasOrder",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "导出油站订单") @ApiOperation(value = "导出油站订单")

@ -13,6 +13,7 @@ import com.hai.entity.HighMerchantStore;
import com.hai.entity.SecDictionary; import com.hai.entity.SecDictionary;
import com.hai.entity.SecRegion; import com.hai.entity.SecRegion;
import com.hai.enum_type.GasTaskPriceTypeEnum; import com.hai.enum_type.GasTaskPriceTypeEnum;
import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel; import com.hai.model.UserInfoModel;
import com.hai.service.CommonService; import com.hai.service.CommonService;
@ -112,6 +113,7 @@ public class HighGasOilPriceTaskController {
task.setRegionId(store.getRegionId()); task.setRegionId(store.getRegionId());
task.setRegionName(store.getRegionName()); task.setRegionName(store.getRegionName());
task.setMerStoreId(store.getId()); task.setMerStoreId(store.getId());
task.setMerStoreKey(store.getStoreKey());
task.setMerStoreName(store.getStoreName()); task.setMerStoreName(store.getStoreName());
task.setMerStoreAddress(store.getAddress()); task.setMerStoreAddress(store.getAddress());
} }
@ -179,6 +181,7 @@ public class HighGasOilPriceTaskController {
public ResponseData getTaskList(@RequestParam(name = "regionId", required = false) Integer regionId, public ResponseData getTaskList(@RequestParam(name = "regionId", required = false) Integer regionId,
@RequestParam(name = "regionName", required = false) String regionName, @RequestParam(name = "regionName", required = false) String regionName,
@RequestParam(name = "merStoreId", required = false) Integer merStoreId, @RequestParam(name = "merStoreId", required = false) Integer merStoreId,
@RequestParam(name = "merStoreKey", required = false) String merStoreKey,
@RequestParam(name = "merStoreName", required = false) String merStoreName, @RequestParam(name = "merStoreName", required = false) String merStoreName,
@RequestParam(name = "oilType", required = false) Integer oilType, @RequestParam(name = "oilType", required = false) Integer oilType,
@RequestParam(name = "oilNo", required = false) Integer oilNo, @RequestParam(name = "oilNo", required = false) Integer oilNo,
@ -188,15 +191,31 @@ public class HighGasOilPriceTaskController {
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) { @RequestParam(name = "pageSize", required = true) Integer pageSize) {
try { try {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel == null) {
log.error("HighGasController -> disabledOil() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("regionId", regionId); param.put("regionId", regionId);
param.put("regionName", regionName); param.put("regionName", regionName);
param.put("merStoreId", status); param.put("merStoreId", merStoreId);
param.put("merStoreName", status); param.put("merStoreKey", merStoreKey);
param.put("oilType", status); param.put("merStoreName", merStoreName);
param.put("oilNo", status);
param.put("priceType", status); if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) {
param.put("executionType", status);
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) {
param.put("regionId", userInfoModel.getBsCompany().getRegionId());
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type3.getType())) {
param.put("merStoreId", userInfoModel.getMerchantStore().getId());
}
param.put("oilType", oilType);
param.put("oilNo", oilNo);
param.put("priceType", priceType);
param.put("executionType", executionType);
param.put("status", status); param.put("status", status);
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);

@ -38,8 +38,8 @@ public class DateUtil {
public static long getSecondDiff(Date startTime, Date endTime) { public static long getSecondDiff(Date startTime, Date endTime) {
try { try {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long eTime = startTime.getTime(); long eTime = endTime.getTime();
long sTime = endTime.getTime(); long sTime = startTime.getTime();
long diff = (eTime - sTime) / 1000; long diff = (eTime - sTime) / 1000;
return diff; return diff;
} catch (Exception e) { } catch (Exception e) {
@ -778,6 +778,11 @@ public class DateUtil {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String a = "51130319931105651X"; String a = "51130319931105651X";
Date date = new Date();
date.setTime(1653979200000L);
System.out.println(getSecondDiff(new Date(), date));
} }
} }

@ -40,25 +40,27 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt
@Insert({ @Insert({
"insert into high_gas_oil_price_task (region_id, region_name, ", "insert into high_gas_oil_price_task (region_id, region_name, ",
"mer_store_id, mer_store_name, ", "mer_store_key, mer_store_id, ",
"mer_store_address, oil_type, ", "mer_store_name, mer_store_address, ",
"oil_type_name, oil_no, ", "oil_type, oil_type_name, ",
"oil_no_name, price_type, ", "oil_no, oil_no_name, ",
"price, execution_type, ", "price_type, price, ",
"start_time, `status`, ", "execution_type, start_time, ",
"create_time, update_time, ", "`status`, create_time, ",
"op_user_id, op_user_name, ", "update_time, op_user_id, ",
"ext_1, ext_2, ext_3)", "op_user_name, ext_1, ",
"ext_2, ext_3)",
"values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", "values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ",
"#{merStoreId,jdbcType=BIGINT}, #{merStoreName,jdbcType=VARCHAR}, ", "#{merStoreKey,jdbcType=VARCHAR}, #{merStoreId,jdbcType=BIGINT}, ",
"#{merStoreAddress,jdbcType=VARCHAR}, #{oilType,jdbcType=INTEGER}, ", "#{merStoreName,jdbcType=VARCHAR}, #{merStoreAddress,jdbcType=VARCHAR}, ",
"#{oilTypeName,jdbcType=VARCHAR}, #{oilNo,jdbcType=INTEGER}, ", "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ",
"#{oilNoName,jdbcType=VARCHAR}, #{priceType,jdbcType=INTEGER}, ", "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ",
"#{price,jdbcType=DECIMAL}, #{executionType,jdbcType=INTEGER}, ", "#{priceType,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"#{startTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", "#{executionType,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighGasOilPriceTask record); int insert(HighGasOilPriceTask record);
@ -72,6 +74,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_key", property="merStoreKey", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_id", property="merStoreId", jdbcType=JdbcType.BIGINT), @Result(column="mer_store_id", property="merStoreId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_store_name", property="merStoreName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_store_name", property="merStoreName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR),
@ -96,7 +99,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt
@Select({ @Select({
"select", "select",
"id, region_id, region_name, mer_store_id, mer_store_name, mer_store_address, ", "id, region_id, region_name, mer_store_key, mer_store_id, mer_store_name, mer_store_address, ",
"oil_type, oil_type_name, oil_no, oil_no_name, price_type, price, execution_type, ", "oil_type, oil_type_name, oil_no, oil_no_name, price_type, price, execution_type, ",
"start_time, `status`, create_time, update_time, op_user_id, op_user_name, ext_1, ", "start_time, `status`, create_time, update_time, op_user_id, op_user_name, ext_1, ",
"ext_2, ext_3", "ext_2, ext_3",
@ -107,6 +110,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_key", property="merStoreKey", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_id", property="merStoreId", jdbcType=JdbcType.BIGINT), @Result(column="mer_store_id", property="merStoreId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_store_name", property="merStoreName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_store_name", property="merStoreName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR),
@ -142,6 +146,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt
"update high_gas_oil_price_task", "update high_gas_oil_price_task",
"set region_id = #{regionId,jdbcType=BIGINT},", "set region_id = #{regionId,jdbcType=BIGINT},",
"region_name = #{regionName,jdbcType=VARCHAR},", "region_name = #{regionName,jdbcType=VARCHAR},",
"mer_store_key = #{merStoreKey,jdbcType=VARCHAR},",
"mer_store_id = #{merStoreId,jdbcType=BIGINT},", "mer_store_id = #{merStoreId,jdbcType=BIGINT},",
"mer_store_name = #{merStoreName,jdbcType=VARCHAR},", "mer_store_name = #{merStoreName,jdbcType=VARCHAR},",
"mer_store_address = #{merStoreAddress,jdbcType=VARCHAR},", "mer_store_address = #{merStoreAddress,jdbcType=VARCHAR},",

@ -36,6 +36,10 @@ public class HighGasOilPriceTaskSqlProvider {
sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}");
} }
if (record.getMerStoreKey() != null) {
sql.VALUES("mer_store_key", "#{merStoreKey,jdbcType=VARCHAR}");
}
if (record.getMerStoreId() != null) { if (record.getMerStoreId() != null) {
sql.VALUES("mer_store_id", "#{merStoreId,jdbcType=BIGINT}"); sql.VALUES("mer_store_id", "#{merStoreId,jdbcType=BIGINT}");
} }
@ -124,6 +128,7 @@ public class HighGasOilPriceTaskSqlProvider {
} }
sql.SELECT("region_id"); sql.SELECT("region_id");
sql.SELECT("region_name"); sql.SELECT("region_name");
sql.SELECT("mer_store_key");
sql.SELECT("mer_store_id"); sql.SELECT("mer_store_id");
sql.SELECT("mer_store_name"); sql.SELECT("mer_store_name");
sql.SELECT("mer_store_address"); sql.SELECT("mer_store_address");
@ -172,6 +177,10 @@ public class HighGasOilPriceTaskSqlProvider {
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
} }
if (record.getMerStoreKey() != null) {
sql.SET("mer_store_key = #{record.merStoreKey,jdbcType=VARCHAR}");
}
if (record.getMerStoreId() != null) { if (record.getMerStoreId() != null) {
sql.SET("mer_store_id = #{record.merStoreId,jdbcType=BIGINT}"); sql.SET("mer_store_id = #{record.merStoreId,jdbcType=BIGINT}");
} }
@ -259,6 +268,7 @@ public class HighGasOilPriceTaskSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}");
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
sql.SET("mer_store_key = #{record.merStoreKey,jdbcType=VARCHAR}");
sql.SET("mer_store_id = #{record.merStoreId,jdbcType=BIGINT}"); sql.SET("mer_store_id = #{record.merStoreId,jdbcType=BIGINT}");
sql.SET("mer_store_name = #{record.merStoreName,jdbcType=VARCHAR}"); sql.SET("mer_store_name = #{record.merStoreName,jdbcType=VARCHAR}");
sql.SET("mer_store_address = #{record.merStoreAddress,jdbcType=VARCHAR}"); sql.SET("mer_store_address = #{record.merStoreAddress,jdbcType=VARCHAR}");
@ -296,6 +306,10 @@ public class HighGasOilPriceTaskSqlProvider {
sql.SET("region_name = #{regionName,jdbcType=VARCHAR}"); sql.SET("region_name = #{regionName,jdbcType=VARCHAR}");
} }
if (record.getMerStoreKey() != null) {
sql.SET("mer_store_key = #{merStoreKey,jdbcType=VARCHAR}");
}
if (record.getMerStoreId() != null) { if (record.getMerStoreId() != null) {
sql.SET("mer_store_id = #{merStoreId,jdbcType=BIGINT}"); sql.SET("mer_store_id = #{merStoreId,jdbcType=BIGINT}");
} }

@ -29,6 +29,11 @@ public class HighGasOilPriceTask implements Serializable {
*/ */
private String regionName; private String regionName;
/**
* 加油站编号
*/
private String merStoreKey;
/** /**
* 加油站id * 加油站id
*/ */
@ -75,7 +80,7 @@ public class HighGasOilPriceTask implements Serializable {
private BigDecimal price; private BigDecimal price;
/** /**
* 执行类型 1. 立刻执行 2. 定时执行 * 执行方式 1. 立刻执行 2. 定时执行
*/ */
private Integer executionType; private Integer executionType;
@ -141,6 +146,14 @@ public class HighGasOilPriceTask implements Serializable {
this.regionName = regionName; this.regionName = regionName;
} }
public String getMerStoreKey() {
return merStoreKey;
}
public void setMerStoreKey(String merStoreKey) {
this.merStoreKey = merStoreKey;
}
public Long getMerStoreId() { public Long getMerStoreId() {
return merStoreId; return merStoreId;
} }
@ -308,6 +321,7 @@ public class HighGasOilPriceTask implements Serializable {
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) && (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId()))
&& (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) && (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName()))
&& (this.getMerStoreKey() == null ? other.getMerStoreKey() == null : this.getMerStoreKey().equals(other.getMerStoreKey()))
&& (this.getMerStoreId() == null ? other.getMerStoreId() == null : this.getMerStoreId().equals(other.getMerStoreId())) && (this.getMerStoreId() == null ? other.getMerStoreId() == null : this.getMerStoreId().equals(other.getMerStoreId()))
&& (this.getMerStoreName() == null ? other.getMerStoreName() == null : this.getMerStoreName().equals(other.getMerStoreName())) && (this.getMerStoreName() == null ? other.getMerStoreName() == null : this.getMerStoreName().equals(other.getMerStoreName()))
&& (this.getMerStoreAddress() == null ? other.getMerStoreAddress() == null : this.getMerStoreAddress().equals(other.getMerStoreAddress())) && (this.getMerStoreAddress() == null ? other.getMerStoreAddress() == null : this.getMerStoreAddress().equals(other.getMerStoreAddress()))
@ -336,6 +350,7 @@ public class HighGasOilPriceTask implements Serializable {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode());
result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode());
result = prime * result + ((getMerStoreKey() == null) ? 0 : getMerStoreKey().hashCode());
result = prime * result + ((getMerStoreId() == null) ? 0 : getMerStoreId().hashCode()); result = prime * result + ((getMerStoreId() == null) ? 0 : getMerStoreId().hashCode());
result = prime * result + ((getMerStoreName() == null) ? 0 : getMerStoreName().hashCode()); result = prime * result + ((getMerStoreName() == null) ? 0 : getMerStoreName().hashCode());
result = prime * result + ((getMerStoreAddress() == null) ? 0 : getMerStoreAddress().hashCode()); result = prime * result + ((getMerStoreAddress() == null) ? 0 : getMerStoreAddress().hashCode());
@ -367,6 +382,7 @@ public class HighGasOilPriceTask implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", regionId=").append(regionId); sb.append(", regionId=").append(regionId);
sb.append(", regionName=").append(regionName); sb.append(", regionName=").append(regionName);
sb.append(", merStoreKey=").append(merStoreKey);
sb.append(", merStoreId=").append(merStoreId); sb.append(", merStoreId=").append(merStoreId);
sb.append(", merStoreName=").append(merStoreName); sb.append(", merStoreName=").append(merStoreName);
sb.append(", merStoreAddress=").append(merStoreAddress); sb.append(", merStoreAddress=").append(merStoreAddress);

@ -316,6 +316,76 @@ public class HighGasOilPriceTaskExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMerStoreKeyIsNull() {
addCriterion("mer_store_key is null");
return (Criteria) this;
}
public Criteria andMerStoreKeyIsNotNull() {
addCriterion("mer_store_key is not null");
return (Criteria) this;
}
public Criteria andMerStoreKeyEqualTo(String value) {
addCriterion("mer_store_key =", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyNotEqualTo(String value) {
addCriterion("mer_store_key <>", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyGreaterThan(String value) {
addCriterion("mer_store_key >", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyGreaterThanOrEqualTo(String value) {
addCriterion("mer_store_key >=", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyLessThan(String value) {
addCriterion("mer_store_key <", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyLessThanOrEqualTo(String value) {
addCriterion("mer_store_key <=", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyLike(String value) {
addCriterion("mer_store_key like", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyNotLike(String value) {
addCriterion("mer_store_key not like", value, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyIn(List<String> values) {
addCriterion("mer_store_key in", values, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyNotIn(List<String> values) {
addCriterion("mer_store_key not in", values, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyBetween(String value1, String value2) {
addCriterion("mer_store_key between", value1, value2, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreKeyNotBetween(String value1, String value2) {
addCriterion("mer_store_key not between", value1, value2, "merStoreKey");
return (Criteria) this;
}
public Criteria andMerStoreIdIsNull() { public Criteria andMerStoreIdIsNull() {
addCriterion("mer_store_id is null"); addCriterion("mer_store_id is null");
return (Criteria) this; return (Criteria) this;

@ -147,6 +147,12 @@ public interface CommonService {
*/ */
SecRegion getRegionsById(Long regionId); SecRegion getRegionsById(Long regionId);
/**
* 查询省级列表
* @return
*/
List<SecRegion> getProvinceList();
/** /**
* 根据地区名称模糊查询 * 根据地区名称模糊查询
* @param regionName * @param regionName

@ -89,7 +89,10 @@ public class BsCompanyServiceImpl implements BsCompanyService {
public BsCompany getCompanyById(Long id) { public BsCompany getCompanyById(Long id) {
BsCompany company =bsCompanyMapper.selectByPrimaryKey(id); BsCompany company =bsCompanyMapper.selectByPrimaryKey(id);
if (company.getRegionId() != null) { if (company.getRegionId() != null) {
// company.setRegionName(commonService.getRegionName(Long.valueOf(company.getRegionId()))); SecRegion region = commonService.getRegionsById(Long.parseLong(company.getRegionId()));
if (region != null) {
company.setRegionName(region.getRegionName());
}
} }
return company; return company;
} }

@ -397,6 +397,13 @@ public class CommonServiceImpl implements CommonService {
return regionMapper.selectByPrimaryKey(regionId); return regionMapper.selectByPrimaryKey(regionId);
} }
@Override
public List<SecRegion> getProvinceList() {
SecRegionExample example = new SecRegionExample();
example.createCriteria().andParentIdIsNull().andStatusEqualTo(1);
return regionMapper.selectByExample(example);
}
@Override @Override
public SecRegion getRegionsByName(String regionName) { public SecRegion getRegionsByName(String regionName) {
SecRegionExample example = new SecRegionExample(); SecRegionExample example = new SecRegionExample();

@ -72,7 +72,12 @@ public class HighGasOilPriceTaskServiceImpl implements HighGasOilPriceTaskServic
businessHandle(gasOilPriceTask); businessHandle(gasOilPriceTask);
} else if (gasOilPriceTask.getExecutionType().equals(GasTaskExecutionTypeEnum.type2.getStatus())) { } else if (gasOilPriceTask.getExecutionType().equals(GasTaskExecutionTypeEnum.type2.getStatus())) {
redisUtil.set(MsgTopic.oilPriceTask.getName() + "-" + gasOilPriceTask, DateUtil.getSecondDiff(new Date(), gasOilPriceTask.getStartTime())); long time = DateUtil.getSecondDiff(new Date(), gasOilPriceTask.getStartTime());
if (time >= 1) {
redisUtil.set(MsgTopic.oilPriceTask.getName() + "-" + gasOilPriceTask.getId(), "", time);
} else {
businessHandle(gasOilPriceTask);
}
} }
} }
@ -165,6 +170,10 @@ public class HighGasOilPriceTaskServiceImpl implements HighGasOilPriceTaskServic
criteria.andMerStoreNameLike("%" + MapUtils.getString(param, "merStoreName") + "%"); criteria.andMerStoreNameLike("%" + MapUtils.getString(param, "merStoreName") + "%");
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "merStoreKey"))) {
criteria.andMerStoreKeyLike("%" + MapUtils.getString(param, "merStoreKey") + "%");
}
if (MapUtils.getInteger(param, "oilType") != null) { if (MapUtils.getInteger(param, "oilType") != null) {
criteria.andOilTypeEqualTo(MapUtils.getInteger(param, "oilType")); criteria.andOilTypeEqualTo(MapUtils.getInteger(param, "oilType"));
} }

@ -178,6 +178,14 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
HighMerchantStoreExample example = new HighMerchantStoreExample(); HighMerchantStoreExample example = new HighMerchantStoreExample();
HighMerchantStoreExample.Criteria criteria = example.createCriteria(); HighMerchantStoreExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
}
if (MapUtils.getInteger(map, "sourceType") != null) {
criteria.andSourceTypeEqualTo(MapUtils.getInteger(map, "sourceType"));
}
if (MapUtils.getLong(map, "companyId") != null) { if (MapUtils.getLong(map, "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId")); criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId"));
} }

Loading…
Cancel
Save