Compare commits

..

3 Commits

  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); HighGasOilGunNo getGunNoById(Long id);
/**
* 清除油号
* @param storeId
*/
void cleanGunNo(Long storeId);
/** /**
* 根据门店和抢号查询 * 根据门店和抢号查询
* @param storeId * @param storeId

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

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

Loading…
Cancel
Save