测试环境中 账号 OK888 YS2024 账号下 店铺管理>>店铺管理 中 编号16318844 数据重复问题排查
This commit is contained in:
parent
b937cb0882
commit
8e1e0b93f4
|
@ -35,6 +35,8 @@ public interface BusStoreConfigInfoMapper
|
|||
*/
|
||||
public int insertBusStoreConfigInfo(BusStoreConfigInfo busStoreConfigInfo);
|
||||
|
||||
public Integer countBusStoreConfigInfo(String storeCode);
|
||||
|
||||
/**
|
||||
* 修改店铺配置信息
|
||||
*
|
||||
|
@ -59,4 +61,6 @@ public interface BusStoreConfigInfoMapper
|
|||
*/
|
||||
public int deleteBusStoreConfigInfoByIds(Long[] ids);
|
||||
|
||||
public int deleteBusStoreConfigInfoByCode(String storeCode);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.BusStoreConfigInfoMapper;
|
||||
import com.ruoyi.business.domain.BusStoreConfigInfo;
|
||||
import com.ruoyi.business.service.IBusStoreConfigInfoService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 店铺配置信息Service业务层处理
|
||||
|
@ -49,9 +52,17 @@ public class BusStoreConfigInfoServiceImpl implements IBusStoreConfigInfoService
|
|||
* @param busStoreConfigInfo 店铺配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertBusStoreConfigInfo(BusStoreConfigInfo busStoreConfigInfo)
|
||||
{
|
||||
if(busStoreConfigInfo != null && StringUtils.isNotBlank(busStoreConfigInfo.getStoreCode())){
|
||||
String storeCode = busStoreConfigInfo.getStoreCode();
|
||||
Integer c = busStoreConfigInfoMapper.countBusStoreConfigInfo(storeCode);
|
||||
if(c > 0){
|
||||
busStoreConfigInfoMapper.deleteBusStoreConfigInfoByCode(storeCode);
|
||||
}
|
||||
}
|
||||
return busStoreConfigInfoMapper.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.ruoyi.business.domain.resp.RespBusStoreInfo;
|
|||
import com.ruoyi.business.mapper.BusMarketOperationInfoMapper;
|
||||
import com.ruoyi.business.mapper.BusSaleInfoMapper;
|
||||
import com.ruoyi.business.mapper.BusStoreConfigInfoMapper;
|
||||
import com.ruoyi.business.service.IBusStoreConfigInfoService;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
|
@ -44,6 +45,9 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
|
|||
@Autowired
|
||||
private BusMarketOperationInfoMapper busMarketOperationInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private IBusStoreConfigInfoService busStoreConfigInfoService;
|
||||
|
||||
/**
|
||||
* 查询店铺信息
|
||||
*
|
||||
|
@ -225,7 +229,8 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
|
|||
List<BusStoreConfigInfo> ll = busStoreConfigInfoMapper.selectBusStoreConfigInfoList(busStoreConfigInfo1);
|
||||
// 配置新增修改
|
||||
if(ll.size() == 0){
|
||||
count = busStoreConfigInfoMapper.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
// count = busStoreConfigInfoMapper.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
count = busStoreConfigInfoService.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
}else if(ll.size() ==1){
|
||||
busStoreConfigInfo.setId(ll.get(0).getId());
|
||||
if(StringUtils.isEmpty(busStoreConfigInfo.getMarketingChannels())){
|
||||
|
|
|
@ -92,6 +92,9 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
@Autowired
|
||||
private BusStoreDayHistoryInfoMapper busStoreDayHistoryInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private IBusStoreConfigInfoService busStoreConfigInfoService;
|
||||
|
||||
private static CloseableHttpClient client1 = HttpClientBuilder.create().build();
|
||||
|
||||
/**
|
||||
|
@ -158,7 +161,8 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
busStoreConfigInfo.setMinOrderNum(1);
|
||||
busStoreConfigInfo.setMaxOrderNum(1);
|
||||
busStoreConfigInfo.setSelfDeliveryDuration(60);
|
||||
busStoreConfigInfoMapper.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
// busStoreConfigInfoMapper.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
busStoreConfigInfoService.insertBusStoreConfigInfo(busStoreConfigInfo);
|
||||
|
||||
} else if (list.size() == 1) {
|
||||
// 不同代理人绑定
|
||||
|
|
|
@ -63,6 +63,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="countBusStoreConfigInfo" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select count(1) from bus_store_config_info where store_code = #{storeCode} limit 0,1
|
||||
</select>
|
||||
|
||||
<delete id="deleteBusStoreConfigInfoByCode" parameterType="java.lang.String">
|
||||
delete from bus_store_config_info where store_code = #{storeCode}
|
||||
</delete>
|
||||
|
||||
<insert id="insertBusStoreConfigInfo" parameterType="BusStoreConfigInfo">
|
||||
insert into bus_store_config_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
Loading…
Reference in New Issue