提交代码

2.0-dev
胡锐 6 months ago
parent 79522213c2
commit f6265b10fc
  1. 6
      hai-service/src/main/java/com/hai/service/HighGasOilGunNoService.java
  2. 7
      hai-service/src/main/java/com/hai/service/impl/HighGasOilGunNoServiceImpl.java
  3. 6
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java

@ -23,6 +23,12 @@ public interface HighGasOilGunNoService {
*/
HighGasOilGunNo getGunNoById(Long id);
/**
* 清除油号
* @param storeId
*/
void cleanGunNo(Long storeId);
/**
* 根据门店和抢号查询
* @param storeId

@ -34,6 +34,13 @@ public class HighGasOilGunNoServiceImpl implements HighGasOilGunNoService {
return gasOilGunNoMapper.selectByPrimaryKey(id);
}
@Override
public void cleanGunNo(Long storeId) {
HighGasOilGunNoExample example = new HighGasOilGunNoExample();
example.createCriteria().andStoreIdEqualTo(storeId);
gasOilGunNoMapper.deleteByExample(example);
}
@Override
public HighGasOilGunNo getDetailByStoreAndGunNo(Long storeId, String gunNo) {
HighGasOilGunNoExample example = new HighGasOilGunNoExample();

@ -98,6 +98,8 @@ public class HighGasServiceImpl implements HighGasService {
store.setUpdateTime(new Date());
highMerchantStoreService.updateMerchantStoreDetail(store);
gasOilGunNoService.cleanGunNo(store.getId());
JSONArray oilPriceList = station.getJSONArray("oilPriceList");
for (Object oilPrice : oilPriceList) {
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice));
@ -297,6 +299,8 @@ public class HighGasServiceImpl implements HighGasService {
store.setUpdateTime(new Date());
highMerchantStoreService.updateMerchantStoreDetail(store);
gasOilGunNoService.cleanGunNo(store.getId());
JSONArray oilPriceList = station.getJSONArray("oilPriceList");
for (Object oilPrice : oilPriceList) {
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice));
@ -657,6 +661,8 @@ public class HighGasServiceImpl implements HighGasService {
store.setUpdateTime(new Date());
highMerchantStoreService.updateMerchantStoreDetail(store);
gasOilGunNoService.cleanGunNo(store.getId());
JSONArray oilPriceList = station.getJSONArray("oils");
for (Object oilPrice : oilPriceList) {
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice));

Loading…
Cancel
Save