diff --git a/hai-bweb/src/main/java/com/bweb/controller/CommonController.java b/hai-bweb/src/main/java/com/bweb/controller/CommonController.java index ae62e3a6..1224340e 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/CommonController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/CommonController.java @@ -38,6 +38,19 @@ public class CommonController { 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) @ResponseBody @ApiOperation(value = "分级查询区域信息") diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index f256750f..4aea9994 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -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 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) @ResponseBody @ApiOperation(value = "导出油站订单") diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceTaskController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceTaskController.java index 8b970437..223d1f26 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceTaskController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceTaskController.java @@ -13,6 +13,7 @@ import com.hai.entity.HighMerchantStore; import com.hai.entity.SecDictionary; import com.hai.entity.SecRegion; import com.hai.enum_type.GasTaskPriceTypeEnum; +import com.hai.enum_type.UserObjectTypeEnum; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; import com.hai.service.CommonService; @@ -112,6 +113,7 @@ public class HighGasOilPriceTaskController { task.setRegionId(store.getRegionId()); task.setRegionName(store.getRegionName()); task.setMerStoreId(store.getId()); + task.setMerStoreKey(store.getStoreKey()); task.setMerStoreName(store.getStoreName()); task.setMerStoreAddress(store.getAddress()); } @@ -179,6 +181,7 @@ public class HighGasOilPriceTaskController { public ResponseData getTaskList(@RequestParam(name = "regionId", required = false) Integer regionId, @RequestParam(name = "regionName", required = false) String regionName, @RequestParam(name = "merStoreId", required = false) Integer merStoreId, + @RequestParam(name = "merStoreKey", required = false) String merStoreKey, @RequestParam(name = "merStoreName", required = false) String merStoreName, @RequestParam(name = "oilType", required = false) Integer oilType, @RequestParam(name = "oilNo", required = false) Integer oilNo, @@ -188,15 +191,31 @@ public class HighGasOilPriceTaskController { @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel == null) { + log.error("HighGasController -> disabledOil() error!",""); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); + } + Map param = new HashMap<>(); param.put("regionId", regionId); param.put("regionName", regionName); - param.put("merStoreId", status); - param.put("merStoreName", status); - param.put("oilType", status); - param.put("oilNo", status); - param.put("priceType", status); - param.put("executionType", status); + param.put("merStoreId", merStoreId); + param.put("merStoreKey", merStoreKey); + param.put("merStoreName", merStoreName); + + if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { + + } 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); PageHelper.startPage(pageNum,pageSize); diff --git a/hai-service/src/main/java/com/hai/common/utils/DateUtil.java b/hai-service/src/main/java/com/hai/common/utils/DateUtil.java index b36e6d81..09d9f1a4 100644 --- a/hai-service/src/main/java/com/hai/common/utils/DateUtil.java +++ b/hai-service/src/main/java/com/hai/common/utils/DateUtil.java @@ -38,8 +38,8 @@ public class DateUtil { public static long getSecondDiff(Date startTime, Date endTime) { try { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - long eTime = startTime.getTime(); - long sTime = endTime.getTime(); + long eTime = endTime.getTime(); + long sTime = startTime.getTime(); long diff = (eTime - sTime) / 1000; return diff; } catch (Exception e) { @@ -778,6 +778,11 @@ public class DateUtil { public static void main(String[] args) throws Exception { String a = "51130319931105651X"; + + + Date date = new Date(); + date.setTime(1653979200000L); + System.out.println(getSecondDiff(new Date(), date)); } } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java index 3db09123..d10678e9 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java @@ -40,25 +40,27 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @Insert({ "insert into high_gas_oil_price_task (region_id, region_name, ", - "mer_store_id, mer_store_name, ", - "mer_store_address, 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, ext_2, ext_3)", + "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, start_time, ", + "`status`, create_time, ", + "update_time, op_user_id, ", + "op_user_name, ext_1, ", + "ext_2, ext_3)", "values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", - "#{merStoreId,jdbcType=BIGINT}, #{merStoreName,jdbcType=VARCHAR}, ", - "#{merStoreAddress,jdbcType=VARCHAR}, #{oilType,jdbcType=INTEGER}, ", - "#{oilTypeName,jdbcType=VARCHAR}, #{oilNo,jdbcType=INTEGER}, ", - "#{oilNoName,jdbcType=VARCHAR}, #{priceType,jdbcType=INTEGER}, ", - "#{price,jdbcType=DECIMAL}, #{executionType,jdbcType=INTEGER}, ", - "#{startTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{merStoreKey,jdbcType=VARCHAR}, #{merStoreId,jdbcType=BIGINT}, ", + "#{merStoreName,jdbcType=VARCHAR}, #{merStoreAddress,jdbcType=VARCHAR}, ", + "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{priceType,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ", + "#{executionType,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ", + "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") 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="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @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_name", property="merStoreName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @@ -96,7 +99,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @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, ", "start_time, `status`, create_time, update_time, op_user_id, op_user_name, ext_1, ", "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="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @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_name", property="merStoreName", 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", "set region_id = #{regionId,jdbcType=BIGINT},", "region_name = #{regionName,jdbcType=VARCHAR},", + "mer_store_key = #{merStoreKey,jdbcType=VARCHAR},", "mer_store_id = #{merStoreId,jdbcType=BIGINT},", "mer_store_name = #{merStoreName,jdbcType=VARCHAR},", "mer_store_address = #{merStoreAddress,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java index fa514857..81386790 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java @@ -36,6 +36,10 @@ public class HighGasOilPriceTaskSqlProvider { sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); } + if (record.getMerStoreKey() != null) { + sql.VALUES("mer_store_key", "#{merStoreKey,jdbcType=VARCHAR}"); + } + if (record.getMerStoreId() != null) { sql.VALUES("mer_store_id", "#{merStoreId,jdbcType=BIGINT}"); } @@ -124,6 +128,7 @@ public class HighGasOilPriceTaskSqlProvider { } sql.SELECT("region_id"); sql.SELECT("region_name"); + sql.SELECT("mer_store_key"); sql.SELECT("mer_store_id"); sql.SELECT("mer_store_name"); sql.SELECT("mer_store_address"); @@ -172,6 +177,10 @@ public class HighGasOilPriceTaskSqlProvider { 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) { 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("region_id = #{record.regionId,jdbcType=BIGINT}"); 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_name = #{record.merStoreName,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}"); } + if (record.getMerStoreKey() != null) { + sql.SET("mer_store_key = #{merStoreKey,jdbcType=VARCHAR}"); + } + if (record.getMerStoreId() != null) { sql.SET("mer_store_id = #{merStoreId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java index b4a50850..d1f65131 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java @@ -29,6 +29,11 @@ public class HighGasOilPriceTask implements Serializable { */ private String regionName; + /** + * 加油站编号 + */ + private String merStoreKey; + /** * 加油站id */ @@ -75,7 +80,7 @@ public class HighGasOilPriceTask implements Serializable { private BigDecimal price; /** - * 执行类型 1. 立刻执行 2. 定时执行 + * 执行方式 1. 立刻执行 2. 定时执行 */ private Integer executionType; @@ -141,6 +146,14 @@ public class HighGasOilPriceTask implements Serializable { this.regionName = regionName; } + public String getMerStoreKey() { + return merStoreKey; + } + + public void setMerStoreKey(String merStoreKey) { + this.merStoreKey = merStoreKey; + } + public Long getMerStoreId() { return merStoreId; } @@ -308,6 +321,7 @@ public class HighGasOilPriceTask implements Serializable { return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) && (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.getMerStoreName() == null ? other.getMerStoreName() == null : this.getMerStoreName().equals(other.getMerStoreName())) && (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 + ((getRegionId() == null) ? 0 : getRegionId().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 + ((getMerStoreName() == null) ? 0 : getMerStoreName().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(", regionId=").append(regionId); sb.append(", regionName=").append(regionName); + sb.append(", merStoreKey=").append(merStoreKey); sb.append(", merStoreId=").append(merStoreId); sb.append(", merStoreName=").append(merStoreName); sb.append(", merStoreAddress=").append(merStoreAddress); diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java index 601a1183..4527ab1a 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java @@ -316,6 +316,76 @@ public class HighGasOilPriceTaskExample { 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 values) { + addCriterion("mer_store_key in", values, "merStoreKey"); + return (Criteria) this; + } + + public Criteria andMerStoreKeyNotIn(List 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() { addCriterion("mer_store_id is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/service/CommonService.java b/hai-service/src/main/java/com/hai/service/CommonService.java index 0d724440..2a1caa48 100644 --- a/hai-service/src/main/java/com/hai/service/CommonService.java +++ b/hai-service/src/main/java/com/hai/service/CommonService.java @@ -147,6 +147,12 @@ public interface CommonService { */ SecRegion getRegionsById(Long regionId); + /** + * 查询省级列表 + * @return + */ + List getProvinceList(); + /** * 根据地区名称模糊查询 * @param regionName diff --git a/hai-service/src/main/java/com/hai/service/impl/BsCompanyServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/BsCompanyServiceImpl.java index 6a2ed729..f95b0a58 100644 --- a/hai-service/src/main/java/com/hai/service/impl/BsCompanyServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/BsCompanyServiceImpl.java @@ -89,7 +89,10 @@ public class BsCompanyServiceImpl implements BsCompanyService { public BsCompany getCompanyById(Long id) { BsCompany company =bsCompanyMapper.selectByPrimaryKey(id); 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; } diff --git a/hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java index 1cf167c0..3c5d47cc 100644 --- a/hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java @@ -397,6 +397,13 @@ public class CommonServiceImpl implements CommonService { return regionMapper.selectByPrimaryKey(regionId); } + @Override + public List getProvinceList() { + SecRegionExample example = new SecRegionExample(); + example.createCriteria().andParentIdIsNull().andStatusEqualTo(1); + return regionMapper.selectByExample(example); + } + @Override public SecRegion getRegionsByName(String regionName) { SecRegionExample example = new SecRegionExample(); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java index 8bd0c48a..69e845bf 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java @@ -72,7 +72,12 @@ public class HighGasOilPriceTaskServiceImpl implements HighGasOilPriceTaskServic businessHandle(gasOilPriceTask); } 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") + "%"); } + if (StringUtils.isNotBlank(MapUtils.getString(param, "merStoreKey"))) { + criteria.andMerStoreKeyLike("%" + MapUtils.getString(param, "merStoreKey") + "%"); + } + if (MapUtils.getInteger(param, "oilType") != null) { criteria.andOilTypeEqualTo(MapUtils.getInteger(param, "oilType")); } 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 268d69ef..6f9b0166 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 @@ -178,6 +178,14 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { HighMerchantStoreExample example = new HighMerchantStoreExample(); 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) { criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId")); }