Merge branch 'refs/heads/master' into cc_2021104_twelve_points

# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/JoinModeEnum.java
This commit is contained in:
wangff
2025-12-02 19:34:14 +08:00
193 changed files with 10187 additions and 167 deletions

View File

@@ -0,0 +1,67 @@
package com.cool.store.dao;
import com.cool.store.entity.ContractConfigDO;
import com.cool.store.mapper.ContractConfigMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2025/9/8 15:37
* @Version 1.0
*/
@Repository
public class ContractConfigDAO {
@Resource
private ContractConfigMapper contractConfigMapper;
public ContractConfigDO queryContractConfigById(Long id){
return contractConfigMapper.selectByPrimaryKey(id);
}
public int addContractConfig(ContractConfigDO contractConfigDO){
return contractConfigMapper.insertSelective(contractConfigDO);
}
public int updateContractConfig(ContractConfigDO contractConfigDO){
return contractConfigMapper.updateByPrimaryKeySelective(contractConfigDO);
}
/**
* 根据品牌查询对应排序是否存在
* @param brand
* @param serialNumber
* @return
*/
public ContractConfigDO queryContractConfigByBrand(String brand,Integer serialNumber){
return contractConfigMapper.queryContractConfigByBrand(brand,serialNumber);
}
/**
* 合同配置列表
* @param brand
* @return
*/
public List<ContractConfigDO> queryContractConfigList(String brand) {
return contractConfigMapper.queryContractConfigList(brand);
}
/**
* 根据加盟品牌与加盟模式 查出所有的未删除状态的合并合同
* @param brand
* @param mode
* @return
*/
public List<ContractConfigDO> queryContractConfigListByBrandAndMode(String brand,String mode) {
return contractConfigMapper.queryContractConfigListByBrandAndMode(brand,mode);
}
public void deleteContractConfig(Long id) {
contractConfigMapper.deleteByPrimaryKey(id);
}
}

View File

@@ -17,6 +17,7 @@ import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.request.*;
import com.cool.store.response.MiniShopsResponse;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.utils.UUIDUtils;
import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@@ -30,10 +31,7 @@ import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -54,6 +52,10 @@ public class ShopInfoDAO {
if(CollectionUtils.isEmpty(shopInfoList)){
return CommonConstants.ZERO;
}
for (ShopInfoDO shopInfo : shopInfoList) {
validateShopName(shopInfo.getShopName());
shopInfo.setStoreId(UUIDUtils.get32UUID());
}
return shopInfoMapper.batchAddShop(shopInfoList);
}
@@ -70,6 +72,24 @@ public class ShopInfoDAO {
return shopInfo;
}
public ShopInfoDO getShopInfoByStoreId(String storeId) {
ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setStoreId(storeId);
shopInfoDO.setDeleted(false);
return shopInfoMapper.selectOne(shopInfoDO);
}
public List<ShopInfoDO> getShopInfoByStoreIds(List<String> storeIds) {
if (CollectionUtils.isEmpty(storeIds)) {
return Collections.emptyList();
}
Example example = new Example(ShopInfoDO.class);
example.createCriteria()
.andIn("storeId", storeIds)
.andEqualTo("deleted", false);
return shopInfoMapper.selectByExample(example);
}
public List<ShopInfoDO> getShopList(Long lineId){
if(Objects.isNull(lineId)){
return new ArrayList<>();
@@ -95,6 +115,8 @@ public class ShopInfoDAO {
* @return
*/
public Long addShopInfo(ShopInfoDO shopInfo){
validateShopName(shopInfo.getShopName());
shopInfo.setStoreId(UUIDUtils.get32UUID());
shopInfoMapper.insertSelective(shopInfo);
return shopInfo.getId();
}
@@ -104,6 +126,7 @@ public class ShopInfoDAO {
log.info("店铺为空 或者店铺id为空");
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
validateShopName(shopInfo.getShopName());
return shopInfoMapper.updateByPrimaryKeySelective(shopInfo);
}
@@ -359,4 +382,14 @@ public class ShopInfoDAO {
public List<ShopInfoDO> getPushHqtShopList(){
return shopInfoMapper.getPushHqtShopList();
}
/**
* 校验名称 不能包含旗舰二字
* @param shopName
*/
private void validateShopName(String shopName) {
if (StringUtils.isNotBlank(shopName) && shopName.contains("旗舰")) {
throw new ServiceException(ErrorCodeEnum.SHOP_NAME_INVALID);
}
}
}

View File

@@ -58,6 +58,10 @@ public class ShopStageInfoDAO {
// 三明治跳过营帐通开通
continue;
}
// TODO: 临时跳过
if (shopSubStageEnum.equals(ShopSubStageEnum.SHOP_STAGE_6)) {
continue;
}
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
shopStageInfo.setLineId(lineId);
shopStageInfo.setShopId(shopId);

View File

@@ -1,6 +1,8 @@
package com.cool.store.dao;
import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.excel.util.StringUtils;
import com.cool.store.dto.contract.ContractCallbackDTO;
import com.cool.store.entity.SignFranchiseDO;
import com.cool.store.mapper.SignFranchiseMapper;
import org.apache.ibatis.annotations.Param;
@@ -38,4 +40,11 @@ public class SignFranchiseDAO {
public SignFranchiseDO selectByShopId(Long shopId){
return signFranchiseMapper.selectByShopId(shopId);
}
public void updateAuditByShopId(Long auditId, Long shopId, ContractCallbackDTO dto){
if (dto==null || (StringUtils.isEmpty(dto.getReason())&&dto.getInfoConsistencyFlag()==null)){
return;
}
signFranchiseMapper.updateAuditByShopId(auditId,shopId,dto);
}
}

View File

@@ -0,0 +1,42 @@
package com.cool.store.dao.decoration;
import com.cool.store.dto.decoration.DecorationTeamDTO;
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
import com.cool.store.mapper.decoration.DecorationTeamConfigMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2025/10/29 15:07
* @Version 1.0
*/
@Repository
public class DecorationTeamConfigDAO {
@Resource
private DecorationTeamConfigMapper decorationTeamConfigMapper;
public void addTeam(DecorationTeamConfigDO decorationTeamConfigDO){
decorationTeamConfigMapper.insertSelective(decorationTeamConfigDO);
}
public void updateTeam(DecorationTeamConfigDO decorationTeamConfigDO){
decorationTeamConfigMapper.updateByPrimaryKeySelective(decorationTeamConfigDO);
}
public DecorationTeamConfigDO getById(Long id){
if (id == null){
return null;
}
return decorationTeamConfigMapper.selectByPrimaryKey(id);
}
public List<DecorationTeamDTO> listByCondition(){
return decorationTeamConfigMapper.listByCondition();
}
}

View File

@@ -0,0 +1,71 @@
package com.cool.store.dao.decoration;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dto.decoration.DecorationListDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
import com.cool.store.mapper.decoration.ShopDecorationAssignMapper;
import com.cool.store.request.decoration.DecorationListRequest;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author suzhuhong
* @Date 2025/10/29 15:07
* @Version 1.0
*/
@Repository
public class ShopDecorationAssignDAO {
@Resource
private ShopDecorationAssignMapper shopDecorationAssignMapper;
@Resource
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
public Integer insert(ShopDecorationAssignDO shopDecorationAssignDO) {
if (shopDecorationAssignDO == null){
return 0;
}
return shopDecorationAssignMapper.insert(shopDecorationAssignDO);
}
public ShopDecorationAssignDO getById(Long id) {
if (id == null){
return null;
}
return shopDecorationAssignMapper.selectByPrimaryKey(id);
}
public Integer update(ShopDecorationAssignDO shopDecorationAssignDO) {
if (shopDecorationAssignDO == null){
return 0;
}
return shopDecorationAssignMapper.updateByPrimaryKey(shopDecorationAssignDO);
}
public Integer countByTeamId(Long teamId) {
if (teamId == null){
return 0;
}
return shopDecorationAssignMapper.countByTeamId(teamId);
}
public List<DecorationListDTO> listByCondition(DecorationListRequest request) {
if (request == null){
return null;
}
if (request.getWantShopAreaId()!=null){
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(request.getWantShopAreaId());
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByKeyword(hyOpenAreaInfoDO.getAreaPath(), null, null, false);
List<Long> wantShopAreaIds = hyOpenAreaInfoDOList.stream().map(HyOpenAreaInfoDO::getId).collect(Collectors.toList());
request.setWantShopAreaIds(wantShopAreaIds);
}
return shopDecorationAssignMapper.listByCondition(request);
}
}

View File

@@ -0,0 +1,73 @@
package com.cool.store.dao.decoration;
import com.aliyun.openservices.shade.com.google.common.collect.Maps;
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
import com.cool.store.entity.decoration.TeamAreaMappingDO;
import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author suzhuhong
* @Date 2025/10/29 15:08
* @Version 1.0
*/
@Repository
public class TeamAreaMappingDAO {
@Resource
private TeamAreaMappingMapper teamAreaMappingMapper;
public void batchInsert(Long teamId,List<Long> cityId){
if (teamId == null || CollectionUtils.isEmpty(cityId)){
return;
}
List<TeamAreaMappingDO> list = new ArrayList<>();
cityId.forEach(x->{
TeamAreaMappingDO teamAreaMappingDO = new TeamAreaMappingDO();
teamAreaMappingDO.setTeamId(teamId);
teamAreaMappingDO.setOpenCityId(x);
list.add(teamAreaMappingDO);
});
teamAreaMappingMapper.batchInsert(list);
}
public int deletedByTeamId(Long teamId){
if (teamId == null){
return 0;
}
return teamAreaMappingMapper.deletedByTeamId(teamId);
}
public int deletedIds(List<Long> ids){
if (CollectionUtils.isEmpty(ids)){
return 0;
}
return teamAreaMappingMapper.deletedIds(ids);
}
public TeamAreaMappingDO getByCityId(Long cityId){
return teamAreaMappingMapper.getByCityId(cityId);
}
public Map<Long, List<TeamAreaMappingDTO>> listByTeamIdList(List<Long> teamIdList){
if (CollectionUtils.isEmpty(teamIdList)){
return Maps.newHashMap();
}
List<TeamAreaMappingDTO> teamAreaMappingDTOS = teamAreaMappingMapper.listByTeamIdList(teamIdList);
Map<Long, List<TeamAreaMappingDTO>> map = teamAreaMappingDTOS.stream().collect(Collectors.groupingBy(TeamAreaMappingDTO::getTeamId));
return map;
}
}

View File

@@ -0,0 +1,52 @@
package com.cool.store.dao.wallet;
import com.cool.store.entity.wallet.OpenBankInfoDO;
import com.cool.store.mapper.wallet.OpenBankInfoMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @Author suzhuhong
* @Date 2025/11/20 10:37
* @Version 1.0
*/
@Repository
public class OpenBankInfoDAO {
@Resource
private OpenBankInfoMapper openBankInfoMapper;
public int insertSelective(OpenBankInfoDO openBankInfoDO){
return openBankInfoMapper.insertSelective(openBankInfoDO);
}
public int updateByStoreCode(OpenBankInfoDO openBankInfoDO){
return openBankInfoMapper.updateByStoreCode(openBankInfoDO);
}
public OpenBankInfoDO getOpenBankInfo(String storeCode){
return openBankInfoMapper.getOpenBankInfo(storeCode);
}
public OpenBankInfoDO getOpenBankInfoByStoreId(String storeId) {
return openBankInfoMapper.selectOne(OpenBankInfoDO.builder().storeId(storeId).build());
}
public int insertOrUpdateByStoreId(OpenBankInfoDO openBankInfoDO) {
if (StringUtils.isBlank(openBankInfoDO.getStoreId())) {
return 0;
}
if (Objects.isNull(getOpenBankInfo(openBankInfoDO.getStoreId()))) {
return openBankInfoMapper.insertSelective(openBankInfoDO);
} else {
Example example = new Example(OpenBankInfoDO.class);
example.createCriteria().andEqualTo("storeId", openBankInfoDO.getStoreId());
return openBankInfoMapper.updateByExampleSelective(openBankInfoDO, example);
}
}
}

View File

@@ -0,0 +1,35 @@
package com.cool.store.dao.wallet;
import com.cool.store.entity.wallet.TempOpenWalletInfoDO;
import com.cool.store.mapper.wallet.TempOpenWalletInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2025/11/20 10:03
* @Version 1.0
*/
@Repository
@RequiredArgsConstructor
public class TempOpenWalletInfoDAO {
@Resource
private TempOpenWalletInfoMapper tempOpenWalletInfoMapper;
/**
* 根据门店编号查询临时开通钱包信息
* @param StoreCode
* @return
*/
public TempOpenWalletInfoDO getTempOpenWalletInfoByStoreCode(String StoreCode) {
if (StoreCode == null){
return null;
}
return tempOpenWalletInfoMapper.getTempOpenWalletInfoByStoreCode(StoreCode);
}
}

View File

@@ -0,0 +1,51 @@
package com.cool.store.dao.wallet;
import com.cool.store.entity.wallet.WalletPaymentOrderDO;
import com.cool.store.mapper.wallet.WalletPaymentOrderMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import java.util.List;
/**
* <p>
* 钱包大额支付DAO
* </p>
*
* @author wangff
* @since 2025/11/18
*/
@Repository
@RequiredArgsConstructor
public class WalletPaymentOrderDAO {
private final WalletPaymentOrderMapper walletPaymentOrderMapper;
public void insertSelective(WalletPaymentOrderDO walletPaymentOrderDO) {
walletPaymentOrderMapper.insertSelective(walletPaymentOrderDO);
}
/**
* 更新订单状态
*/
public void updateOrderByPaymentId(String storeId, String paymentId, Integer orderStatus) {
Example example = new Example(WalletPaymentOrderDO.class);
example.createCriteria()
.andEqualTo("storeId", storeId)
.andEqualTo("paymentId", paymentId);
walletPaymentOrderMapper.updateByExampleSelective(WalletPaymentOrderDO.builder().orderStatus(orderStatus).build(), example);
}
/**
* 查询未支付的充值订单
*/
public List<WalletPaymentOrderDO> getNonPaymentList(String storeId) {
Example example = new Example(WalletPaymentOrderDO.class);
example.createCriteria()
.andEqualTo("storeId", storeId)
.andEqualTo("orderStatus", 3)
.andEqualTo("type", 0);
example.setOrderByClause("create_time DESC");
return walletPaymentOrderMapper.selectByExample(example);
}
}

View File

@@ -0,0 +1,18 @@
package com.cool.store.mapper;
import com.cool.store.entity.ContractConfigDO;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ContractConfigMapper extends Mapper<ContractConfigDO> {
ContractConfigDO queryContractConfigByBrand(String brand, Integer serialNumber);
List<ContractConfigDO> queryContractConfigList(String brand);
List<ContractConfigDO> queryContractConfigListByBrandAndMode(String brand, String mode);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.contract.ContractCallbackDTO;
import com.cool.store.entity.SignFranchiseDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
@@ -11,7 +12,8 @@ public interface SignFranchiseMapper extends Mapper<SignFranchiseDO> {
SignFranchiseDO selectByShopId(@Param("shopId") Long shopId);
void updateAuditByShopId(@Param("auditId") Long auditId,
@Param("shopId") Long shopId);
@Param("shopId") Long shopId,
@Param("dto") ContractCallbackDTO dto);
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
Integer dateHandle();

View File

@@ -0,0 +1,20 @@
package com.cool.store.mapper.decoration;
import com.cool.store.dto.decoration.DecorationTeamDTO;
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface DecorationTeamConfigMapper extends Mapper<DecorationTeamConfigDO> {
/**
* 查询团队
* @return
*/
List<DecorationTeamDTO> listByCondition();
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.mapper.decoration;
import com.cool.store.dto.decoration.DecorationListDTO;
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
import com.cool.store.request.decoration.DecorationListRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ShopDecorationAssignMapper extends Mapper<ShopDecorationAssignDO> {
/**
* 查询团队被门店使用次数
* @param teamId
* @return
*/
Integer countByTeamId(Long teamId);
/**
* 查询分配装修团队列表
* @param request
* @return
*/
List<DecorationListDTO> listByCondition(DecorationListRequest request);
}

View File

@@ -0,0 +1,48 @@
package com.cool.store.mapper.decoration;
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
import com.cool.store.entity.decoration.TeamAreaMappingDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface TeamAreaMappingMapper extends Mapper<TeamAreaMappingDO> {
/**
* 批量插入
* @param list
* @return
*/
Integer batchInsert(@Param("list") List<TeamAreaMappingDO> list);
/**
* 根据团队id删除 更新团队id时候删除
* @param teamId
* @return
*/
Integer deletedByTeamId(@Param("teamId") Long teamId);
/**
* 根据ids删除
* @param ids
* @return
*/
Integer deletedIds(@Param("ids") List<Long> ids);
/**
* 根据城市id查询
* @param cityId
* @return
*/
TeamAreaMappingDO getByCityId(@Param("cityId") Long cityId);
/**
* 根据团队id批量查询
* @param teamIdList
* @return
*/
List<TeamAreaMappingDTO> listByTeamIdList(@Param("teamIdList") List<Long> teamIdList);
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.mapper.wallet;
import com.cool.store.entity.wallet.OpenBankInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface OpenBankInfoMapper extends Mapper<OpenBankInfoDO> {
/**
* 查询门店开户信息
* @param storeCode
* @return
*/
OpenBankInfoDO getOpenBankInfo(@Param("storeCode") String storeCode);
/**
* 根据门店编码更新
* @param openBankInfoDO
* @return
*/
Integer updateByStoreCode(@Param("dto") OpenBankInfoDO openBankInfoDO);
}

View File

@@ -0,0 +1,18 @@
package com.cool.store.mapper.wallet;
import com.cool.store.entity.wallet.TempOpenWalletInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface TempOpenWalletInfoMapper extends Mapper<TempOpenWalletInfoDO> {
/**
* 根据StoreCode查询临时开放钱包信息
* @param StoreCode
* @return
*/
TempOpenWalletInfoDO getTempOpenWalletInfoByStoreCode(@Param("storeCode") String StoreCode);
}

View File

@@ -0,0 +1,7 @@
package com.cool.store.mapper.wallet;
import com.cool.store.entity.wallet.WalletPaymentOrderDO;
import tk.mybatis.mapper.common.Mapper;
public interface WalletPaymentOrderMapper extends Mapper<WalletPaymentOrderDO> {
}

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.ContractConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ContractConfigDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="contract_name" jdbcType="VARCHAR" property="contractName" />
<result column="party_a" jdbcType="VARCHAR" property="partyA" />
<result column="party_b" jdbcType="VARCHAR" property="partyB" />
<result column="party_c" jdbcType="VARCHAR" property="partyC" />
<result column="franchise_mode" jdbcType="VARCHAR" property="franchiseMode" />
<result column="fadada_template_id" jdbcType="VARCHAR" property="fadadaTemplateId" />
<result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
<result column="payee_name" jdbcType="VARCHAR" property="payeeName"/>
<result column="deleted" jdbcType="TINYINT" property="deleted" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="queryContractConfigByBrand" resultMap="BaseResultMap">
select * from xfsg_contract_config where brand = #{brand} and serial_number = #{serialNumber} and deleted = 0
</select>
<select id="queryContractConfigList" resultMap="BaseResultMap">
select * from xfsg_contract_config
where deleted = 0
<if test="brand!=null and brand !=''">
and brand = #{brand}
</if>
</select>
<select id="queryContractConfigListByBrandAndMode" resultMap="BaseResultMap">
select * from xfsg_contract_config
where deleted = 0
<if test="brand!=null and brand !=''">
and brand = #{brand}
</if>
<if test="mode!=null and mode !=''">
and franchise_mode like concat('%,',#{mode},',%')
</if>
</select>
</mapper>

View File

@@ -38,6 +38,7 @@
<result column="manager_region_id" jdbcType="BIGINT" property="managerRegionId"/>
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
</resultMap>
<sql id="allColumn">
@@ -46,17 +47,17 @@
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id
</sql>
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
development_manager,want_shop_area_id,investment_manager) values
development_manager,want_shop_area_id,investment_manager,store_id) values
<foreach collection="shopInfoList" item="shop" separator=",">
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
#{shop.wantShopAreaId},#{shop.investmentManager})
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId})
</foreach>
</insert>
@@ -309,7 +310,8 @@
a.franchise_brand as franchiseBrand,
a.shop_status as shopStatus,
a.detail_address as shopAddress,
a.manager_region_id as managerRegionId
a.manager_region_id as managerRegionId,
a.store_id as storeId
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
<if test="request.contractStartTime !=null and request.contractEndTime != null">
left join xfsg_sign_franchise c on a.id = c.shop_id

View File

@@ -3,7 +3,19 @@
<mapper namespace="com.cool.store.mapper.SignFranchiseMapper">
<update id="updateAuditByShopId">
update xfsg_sign_franchise
set audit_id = #{auditId}
<set>
<if test="auditId!=null">
audit_id = #{auditId},
</if>
<if test="dto!=null">
<if test="dto.infoConsistencyFlag != null">
info_consistency_flag = #{dto.infoConsistencyFlag},
</if>
<if test="dto.reason != null and dto.reason != ''">
reason = #{dto.reason},
</if>
</if>
</set>
where shop_id = #{shopId}
</update>
<update id="dateHandle">

View File

@@ -139,7 +139,7 @@
FROM store_${enterpriseId} a
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
AND (a.store_name LIKE CONCAT('%', #{storeName}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}
@@ -157,7 +157,7 @@
INNER JOIN store_master_signer_info_${enterpriseId} b ON a.store_id = b.store_id
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
AND (a.store_name LIKE CONCAT('%', #{storeName}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}
@@ -172,7 +172,7 @@
INNER JOIN store_master_signer_info_${enterpriseId} b ON a.store_id = b.store_id
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
AND (a.store_name LIKE CONCAT('%', #{storeName}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.decoration.DecorationTeamConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.DecorationTeamConfigDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="team_name" jdbcType="VARCHAR" property="teamName" />
<result column="team_code" jdbcType="VARCHAR" property="teamCode" />
<result column="use_system" jdbcType="TINYINT" property="useSystem" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="TINYINT" property="deleted" />
</resultMap>
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationTeamDTO">
select
t.id,
t.team_name,
t.team_code,
t.use_system
from
zxjp_decoration_team_config t
where t.deleted = 0
</select>
</mapper>

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.decoration.ShopDecorationAssignMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.ShopDecorationAssignDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
<result column="decoration_desc_status" jdbcType="TINYINT" property="decorationDescStatus" />
<result column="decoration_team_id" jdbcType="BIGINT" property="decorationTeamId" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="countByTeamId" resultType="java.lang.Integer">
select count(1) from zxjp_shop_decoration_assign where decoration_team_id = #{teamId}
</select>
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationListDTO">
SELECT
zsda.id as id ,
zsda.shop_id AS shopId,
zsda.decoration_desc_status as decorationDescStatus,
zsda.decoration_team_id as teamId,
xsi.shop_name AS shopName,
xsi.shop_code AS shopCode,
xsi.region_id AS regionId,
xsi.province AS province,
xsi.city AS city,
xsi.district AS district,
xsi.detail_address AS detailAddress,
xsi.store_type AS storeType,
xsf.sign_type AS signType
FROM zxjp_shop_decoration_assign zsda
LEFT JOIN xfsg_shop_info xsi ON zsda.shop_id = xsi.id
LEFT JOIN xfsg_sign_franchise xsf ON zsda.shop_id = xsf.shop_id
<where>
<if test="keyword != null and keyword != ''">
AND (xsi.shop_name LIKE CONCAT('%', #{keyword}, '%') OR xsi.shop_code LIKE CONCAT('%', #{keyword}, '%'))
</if>
<if test="storeType != null">
AND xsi.store_type = #{storeType}
</if>
<if test="signType != null">
AND xsf.sign_type = #{signType}
</if>
<if test="regionId != null">
AND xsi.region_id = #{regionId}
</if>
<if test="decorationDescStatus != null">
AND zsda.decoration_desc_status = #{decorationDescStatus}
</if>
<if test="wantShopAreaIds != null and wantShopAreaIds.size() > 0">
and b.want_shop_area_id in
<foreach collection="wantShopAreaIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.decoration.TeamAreaMappingMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.TeamAreaMappingDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="team_id" jdbcType="BIGINT" property="teamId" />
<result column="open_city_id" jdbcType="BIGINT" property="openCityId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<!-- 批量插入 -->
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO zxjp_team_area_mapping (
team_id,
open_city_id
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.teamId},
#{item.openCityId}
)
</foreach>
</insert>
<!-- 根据团队id删除 更新团队id时候删除 -->
<delete id="deletedByTeamId" parameterType="java.lang.Long">
DELETE FROM zxjp_team_area_mapping
WHERE team_id = #{teamId}
</delete>
<!-- 根据ids删除 -->
<delete id="deletedIds" parameterType="java.util.List">
DELETE FROM zxjp_team_area_mapping
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getByCityId" parameterType="java.lang.Long" resultType="com.cool.store.entity.decoration.TeamAreaMappingDO">
SELECT
*
FROM zxjp_team_area_mapping
WHERE open_city_id = #{cityId}
LIMIT 1
</select>
<select id="listByTeamIdList" parameterType="java.util.List" resultType="com.cool.store.dto.decoration.TeamAreaMappingDTO">
SELECT
a.team_id as teamId,
a.open_city_id as openCityId,
b.area_name as openCityName
FROM zxjp_team_area_mapping a
left join xfsg_open_area_info b on a.open_city_id = b.id
WHERE a.team_id IN
<foreach collection="teamIdList" item="teamId" open="(" separator="," close=")">
#{teamId}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.wallet.OpenBankInfoMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.OpenBankInfoDO">
<!--
WARNING - @mbg.generated
-->
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="signer_name" jdbcType="VARCHAR" property="signerName" />
<result column="signer_id_card" jdbcType="VARCHAR" property="signerIdCard" />
<result column="signer_phone" jdbcType="VARCHAR" property="signerPhone" />
<result column="signer_id_card_front" jdbcType="VARCHAR" property="signerIdCardFront" />
<result column="signer_id_card_back" jdbcType="VARCHAR" property="signerIdCardBack" />
<result column="business_license_name" jdbcType="VARCHAR" property="businessLicenseName" />
<result column="business_license_code" jdbcType="VARCHAR" property="businessLicenseCode" />
<result column="business_license_photo" jdbcType="VARCHAR" property="businessLicensePhoto" />
<result column="legal_is_signer" jdbcType="TINYINT" property="legalIsSigner" />
<result column="legal_name" jdbcType="VARCHAR" property="legalName" />
<result column="legal_id_card" jdbcType="VARCHAR" property="legalIdCard" />
<result column="legal_id_card_expire_time" jdbcType="VARCHAR" property="legalIdCardExpireTime" />
<result column="legal_phone" jdbcType="VARCHAR" property="legalPhone" />
<result column="legal_id_card_front" jdbcType="VARCHAR" property="legalIdCardFront" />
<result column="legal_id_card_back" jdbcType="VARCHAR" property="legalIdCardBack" />
<result column="settlement_card" jdbcType="VARCHAR" property="settlementCard" />
<result column="bank_branch_name" jdbcType="VARCHAR" property="bankBranchName" />
<result column="bank_branch_code" jdbcType="VARCHAR" property="bankBranchCode" />
<result column="bank_reserved_phone" jdbcType="VARCHAR" property="bankReservedPhone" />
<result column="source" jdbcType="TINYINT" property="source" />
</resultMap>
<select id="getOpenBankInfo" resultMap="BaseResultMap">
select * from zxjp_open_bank_info where store_code = #{storeCode}
</select>
<update id="updateByStoreCode" parameterType="com.cool.store.entity.wallet.OpenBankInfoDO">
UPDATE zxjp_open_bank_info
<set>
<if test="dto.storeId != null and dto.storeId != ''">
store_id = #{dto.storeId},
</if>
<if test="dto.signerName != null and dto.signerName != ''">
signer_name = #{dto.signerName},
</if>
<if test="dto.signerIdCard != null and dto.signerIdCard != ''">
signer_id_card = #{dto.signerIdCard},
</if>
<if test="dto.signerPhone != null and dto.signerPhone != ''">
signer_phone = #{dto.signerPhone},
</if>
<if test="dto.signerIdCardFront != null and dto.signerIdCardFront != ''">
signer_id_card_front = #{dto.signerIdCardFront},
</if>
<if test="dto.signerIdCardBack != null and dto.signerIdCardBack != ''">
signer_id_card_back = #{dto.signerIdCardBack},
</if>
<if test="dto.businessLicenseName != null and dto.businessLicenseName != ''">
business_license_name = #{dto.businessLicenseName},
</if>
<if test="dto.businessLicenseCode != null and dto.businessLicenseCode != ''">
business_license_code = #{dto.businessLicenseCode},
</if>
<if test="dto.businessLicensePhoto != null and dto.businessLicensePhoto != ''">
business_license_photo = #{dto.businessLicensePhoto},
</if>
<if test="dto.legalIsSigner != null">
legal_is_signer = #{dto.legalIsSigner},
</if>
<if test="dto.legalName != null and dto.legalName != ''">
legal_name = #{dto.legalName},
</if>
<if test="dto.legalIdCard != null and dto.legalIdCard != ''">
legal_id_card = #{dto.legalIdCard},
</if>
<if test="dto.legalIdCardExpireTime != null and dto.legalIdCardExpireTime != ''">
legal_id_card_expire_time = #{dto.legalIdCardExpireTime},
</if>
<if test="dto.legalPhone != null and dto.legalPhone != ''">
legal_phone = #{dto.legalPhone},
</if>
<if test="dto.legalIdCardFront != null and dto.legalIdCardFront != ''">
legal_id_card_front = #{dto.legalIdCardFront},
</if>
<if test="dto.legalIdCardBack != null and dto.legalIdCardBack != ''">
legal_id_card_back = #{dto.legalIdCardBack},
</if>
<if test="dto.settlementCard != null and dto.settlementCard != ''">
settlement_card = #{dto.settlementCard},
</if>
<if test="dto.bankBranchName != null and dto.bankBranchName != ''">
bank_branch_name = #{dto.bankBranchName},
</if>
<if test="dto.bankBranchCode != null and dto.bankBranchCode != ''">
bank_branch_code = #{dto.bankBranchCode},
</if>
<if test="dto.bankReservedPhone != null and dto.bankReservedPhone != ''">
bank_reserved_phone = #{dto.bankReservedPhone},
</if>
<if test="dto.source != null">
source = #{dto.source},
</if>
</set>
WHERE store_code = #{dto.storeCode}
</update>
</mapper>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.wallet.TempOpenWalletInfoMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.TempOpenWalletInfoDO">
<!--
WARNING - @mbg.generated
-->
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_mode" jdbcType="VARCHAR" property="storeMode" />
<result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" />
<result column="ledger_status" jdbcType="VARCHAR" property="ledgerStatus" />
<result column="business_type" jdbcType="VARCHAR" property="businessType" />
<result column="business_reg_name" jdbcType="VARCHAR" property="businessRegName" />
<result column="business_license_no" jdbcType="VARCHAR" property="businessLicenseNo" />
<result column="business_address" jdbcType="VARCHAR" property="businessAddress" />
<result column="province" jdbcType="VARCHAR" property="province" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="district" jdbcType="VARCHAR" property="district" />
<result column="legal_person_name" jdbcType="VARCHAR" property="legalPersonName" />
<result column="legal_person_id_no" jdbcType="VARCHAR" property="legalPersonIdNo" />
<result column="legal_id_start_date" jdbcType="DATE" property="legalIdStartDate" />
<result column="legal_id_expire_date" jdbcType="DATE" property="legalIdExpireDate" />
<result column="settler_name" jdbcType="VARCHAR" property="settlerName" />
<result column="settler_id_no" jdbcType="VARCHAR" property="settlerIdNo" />
<result column="settler_id_start_date" jdbcType="DATE" property="settlerIdStartDate" />
<result column="settler_id_expire_date" jdbcType="DATE" property="settlerIdExpireDate" />
<result column="bank_branch_name" jdbcType="VARCHAR" property="bankBranchName" />
<result column="bank_branch_no" jdbcType="VARCHAR" property="bankBranchNo" />
<result column="settlement_card_no" jdbcType="VARCHAR" property="settlementCardNo" />
<result column="bank_reserved_phone" jdbcType="VARCHAR" property="bankReservedPhone" />
<result column="accounting_relation" jdbcType="VARCHAR" property="accountingRelation" />
</resultMap>
<select id="getTempOpenWalletInfoByStoreCode" resultMap="BaseResultMap">
select * from zxjp_temp_open_wallet_info where store_code = #{storeCode}
</select>
</mapper>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.wallet.WalletPaymentOrderMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.WalletPaymentOrderDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="expire_time" jdbcType="VARCHAR" property="expireTime" />
<result column="order_status" jdbcType="BIT" property="orderStatus" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
</mapper>