Merge branch 'master' into cc_20250905_franchiseAgreement
# Conflicts: # coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java # coolstore-partner-model/src/main/java/com/cool/store/response/AddSignFranchiseResponse.java # coolstore-partner-service/src/main/java/com/cool/store/service/impl/PushServiceImpl.java # coolstore-partner-service/src/main/java/com/cool/store/service/impl/SignFranchiseServiceImpl.java # coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dao;
|
||||
import com.cool.store.dto.region.BigRegionDTO;
|
||||
import com.cool.store.entity.BigRegionDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.BigRegionMapper;
|
||||
import com.cool.store.request.QueryBigRegionRequest;
|
||||
@@ -12,6 +13,7 @@ import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -25,8 +27,8 @@ public class BigRegionDAO {
|
||||
@Resource
|
||||
BigRegionMapper bigRegionMapper;
|
||||
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword);
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand);
|
||||
}
|
||||
|
||||
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.login.UserLoginDO;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.cool.store.response.oppty.UserResponse;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -56,6 +56,13 @@ public class EnterpriseUserDAO {
|
||||
return enterpriseUserMapper.getUserInfoByUserIds(userIdList);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> getUserInfoByUserMobileList(List<String> mobileList) {
|
||||
if (CollectionUtils.isEmpty(mobileList)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return enterpriseUserMapper.getUserInfoByUserMobileList(mobileList);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(List<String> regionIds, String keyword, List<String> leaderRegionIds) {
|
||||
if (CollectionUtils.isEmpty(regionIds)) {
|
||||
return Lists.newArrayList();
|
||||
@@ -168,4 +175,13 @@ public class EnterpriseUserDAO {
|
||||
}
|
||||
return enterpriseUserMapper.searchUserByUserIdsAndKeyword(userIdList, keyword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从平台库根据唯一id获取用户登录信息
|
||||
* @param unionid 唯一id
|
||||
* @return 用户登录信息
|
||||
*/
|
||||
public UserLoginDO getUserLoginByUnionid(String unionid) {
|
||||
return enterpriseUserMapper.getUserLoginByUnionid(unionid);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.wechat.ServiceAccountOpenIdDTO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerUserInfoMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -112,4 +113,11 @@ public class HyPartnerUserInfoDAO {
|
||||
|
||||
return hyPartnerUserInfoMapper.selectPasswordIsNull();
|
||||
}
|
||||
|
||||
public List<ServiceAccountOpenIdDTO> selectLastBindRecord(List<String> mobileList){
|
||||
if (CollectionUtils.isEmpty(mobileList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyPartnerUserInfoMapper.selectLastBindRecord(mobileList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,13 @@ public class MessageTemplateDAO {
|
||||
return messageTemplateMapper.batchUpdatePublishStatus(ids);
|
||||
}
|
||||
|
||||
public MessageTemplateDO getByKeyword(String keyword) {
|
||||
if (keyword == null){
|
||||
return null;
|
||||
}
|
||||
return messageTemplateMapper.getByKeyword(keyword);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -40,4 +40,8 @@ public class OldShopDAO {
|
||||
List<OldShopDO> list = oldShopMapper.selectByExample(example);
|
||||
return list.isEmpty() ? null : list.get(0);
|
||||
}
|
||||
|
||||
public void insertSelective(OldShopDO oldShopDO) {
|
||||
oldShopMapper.insertSelective(oldShopDO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,27 @@ public class PartnerUserWechatBindDAO {
|
||||
return partnerUserWechatBindMapper.insert(partnerUserWechatBindDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param partnerUserWechatBindDO
|
||||
* @return
|
||||
*/
|
||||
public Integer update(PartnerUserWechatBindDO partnerUserWechatBindDO) {
|
||||
if (partnerUserWechatBindDO == null) {
|
||||
return 0;
|
||||
}
|
||||
return partnerUserWechatBindMapper.update(partnerUserWechatBindDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新所有的unionId对应的服务号ID
|
||||
* @param unionId 开发平台的用户ID
|
||||
* @param serviceAccountOpenId 服务号ID
|
||||
* @return
|
||||
*/
|
||||
public Integer updateByUnionId(String unionId,String serviceAccountOpenId) {
|
||||
return partnerUserWechatBindMapper.updateByUnionId(unionId,serviceAccountOpenId);
|
||||
}
|
||||
|
||||
public PartnerUserWechatBindDO getByOpenIdAndPartnerId(String partnerId, String openId) {
|
||||
if (StringUtil.isEmpty(partnerId)|| StringUtil.isEmpty(openId)){
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.BuildStageDTO;
|
||||
import com.cool.store.dto.PlatformBuildStageDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
@@ -40,17 +42,26 @@ public class ShopStageInfoDAO {
|
||||
/**
|
||||
* 初始化店铺阶段信息
|
||||
* @param lineId
|
||||
* @param shopIds
|
||||
* @param shopInfoList
|
||||
* @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。
|
||||
*/
|
||||
public Integer initShopStageInfo(Long lineId, List<Long> shopIds, Boolean flag) {
|
||||
if (CollectionUtils.isEmpty(shopIds)) {
|
||||
public Integer initShopStageInfo(Long lineId, List<ShopInfoDO> shopInfoList, Boolean flag) {
|
||||
if (CollectionUtils.isEmpty(shopInfoList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> addShopStageList = new ArrayList<>();
|
||||
LocalDate selectStartDate = LocalDate.now();
|
||||
for (Long shopId : shopIds) {
|
||||
for (ShopInfoDO shopInfoDO : shopInfoList) {
|
||||
Long shopId = shopInfoDO.getId();
|
||||
for (ShopSubStageEnum shopSubStageEnum : ShopSubStageEnum.values()) {
|
||||
if (ShopSubStageEnum.SHOP_STAGE_24.equals(shopSubStageEnum) && String.valueOf(FranchiseBrandEnum.ZXSMZ.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||
// 三明治跳过营帐通开通
|
||||
continue;
|
||||
}
|
||||
// TODO: 临时跳过
|
||||
if (shopSubStageEnum.equals(ShopSubStageEnum.SHOP_STAGE_6)) {
|
||||
continue;
|
||||
}
|
||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||
shopStageInfo.setLineId(lineId);
|
||||
shopStageInfo.setShopId(shopId);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
@@ -72,8 +73,8 @@ public class StoreDao {
|
||||
}
|
||||
|
||||
|
||||
public List<StoreDO> list() {
|
||||
return storeMapper.list();
|
||||
public List<StoreDO> list(Integer isIot) {
|
||||
return storeMapper.list(isIot);
|
||||
}
|
||||
|
||||
public List<StoreDO> getStoreNumByStoreCodes(List<String> storeCodeIds) {
|
||||
@@ -83,4 +84,22 @@ public class StoreDao {
|
||||
return storeMapper.getStoreNumByStoreCodes(storeCodeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或编辑最新订货时间
|
||||
* @param dtoList 门店最新订货时间DTO列表
|
||||
* @return int
|
||||
*/
|
||||
public void batchInsertOrUpdateOrderTime(List<StoreOrderTimeDTO> dtoList) {
|
||||
if (CollectionUtils.isEmpty(dtoList)) {
|
||||
return ;
|
||||
}
|
||||
storeMapper.batchInsertOrUpdateOrderTime(dtoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
public List<StoreDO> getAllStoreIdAndNum(List<String> storeStatus) {
|
||||
return storeMapper.getAllStoreIdAndNum(storeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,4 +87,11 @@ public class StoreMessageDAO {
|
||||
public MessageDetailVO getMessageDetail(Long id){
|
||||
return storeMessageMapper.getMessageDetail(id);
|
||||
}
|
||||
|
||||
public Integer batchUpdateHandle(Long id, List<String> storeCodeList){
|
||||
if (id==null||CollectionUtils.isEmpty(storeCodeList)){
|
||||
return 0;
|
||||
}
|
||||
return storeMessageMapper.batchUpdateHandle(id,storeCodeList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.dao.store;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.store.StoreMasterSignerInfoDO;
|
||||
import com.cool.store.mapper.store.StoreMasterSignerInfoMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 门店签约信息DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/9/23
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreMasterSignerInfoDAO {
|
||||
private final StoreMasterSignerInfoMapper storeMasterSignerInfoMapper;
|
||||
|
||||
/**
|
||||
* 获取门店签约信息Map
|
||||
*/
|
||||
public Map<String, StoreMasterSignerInfoDO> getSignerMapByStoreIds(List<String> storeIds) {
|
||||
if (CollectionUtils.isEmpty(storeIds)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreMasterSignerInfoDO> list = storeMasterSignerInfoMapper.selectByStoreIds(storeIds);
|
||||
return CollStreamUtil.toMap(list, StoreMasterSignerInfoDO::getStoreId, v -> v);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionDTO> queryAllBigRegion(String keyword);
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand);
|
||||
|
||||
/**
|
||||
* 根据所属大区与加盟模式查询新管家信息
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.annotation.PlatformDB;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.login.UserLoginDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -32,6 +34,8 @@ public interface EnterpriseUserMapper {
|
||||
*/
|
||||
List<EnterpriseUserDO> getUserInfoByUserIds( @Param("userIdList") List<String> userIdList);
|
||||
|
||||
List<EnterpriseUserDO> getUserInfoByUserMobileList( @Param("mobileList") List<String> mobileList);
|
||||
|
||||
/**
|
||||
* 根据关键字搜索部门下的用户
|
||||
* @param regionIds
|
||||
@@ -101,4 +105,12 @@ public interface EnterpriseUserMapper {
|
||||
List<EnterpriseUserDO> searchUserByUserIdsAndKeyword( @Param("userIdList") List<String> userIdList, @Param("keyword") String keyword);
|
||||
|
||||
List<String> getUserIdsByRegionIdList( @Param("regionIdList") List<String> regionIdList);
|
||||
|
||||
/**
|
||||
* 从平台库根据唯一id获取用户登录信息
|
||||
* @param unionid 唯一id
|
||||
* @return 用户登录信息
|
||||
*/
|
||||
@PlatformDB
|
||||
UserLoginDO getUserLoginByUnionid(@Param("unionid") String unionid);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.wechat.ServiceAccountOpenIdDTO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -55,4 +56,6 @@ public interface HyPartnerUserInfoMapper extends tk.mybatis.mapper.common.Mappe
|
||||
|
||||
List<HyPartnerUserInfoDO> selectPasswordIsNull();
|
||||
|
||||
List<ServiceAccountOpenIdDTO> selectLastBindRecord(@Param("mobileList") List<String> mobileList);
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.mapper;
|
||||
import com.cool.store.dto.notice.CommonDTO;
|
||||
import com.cool.store.dto.notice.NoticeDTO;
|
||||
import com.cool.store.entity.MessageTemplateDO;
|
||||
import com.cool.store.entity.StoreMessageDO;
|
||||
import com.cool.store.request.notice.MessageTemplateQueryRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
@@ -25,6 +26,11 @@ public interface MessageTemplateMapper extends Mapper<MessageTemplateDO> {
|
||||
int batchUpdatePublishStatus(@Param("ids") List<Long> ids);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据关键词查询
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
MessageTemplateDO getByKeyword(@Param("keyword") String keyword);
|
||||
|
||||
}
|
||||
@@ -18,6 +18,22 @@ public interface PartnerUserWechatBindMapper {
|
||||
*/
|
||||
Integer insert(PartnerUserWechatBindDO partnerUserWechatBindDO);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param partnerUserWechatBindDO
|
||||
* @return
|
||||
*/
|
||||
Integer update(PartnerUserWechatBindDO partnerUserWechatBindDO);
|
||||
|
||||
|
||||
/**
|
||||
* 更新所有的unionId对应的服务号ID
|
||||
* @param unionId 开发平台的用户ID
|
||||
* @param serviceAccountOpenId 服务号ID
|
||||
* @return
|
||||
*/
|
||||
Integer updateByUnionId(String unionId,String serviceAccountOpenId);
|
||||
|
||||
/**
|
||||
* 根据partnerId与openId查询
|
||||
* @param partnerId
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.store.StoreAreaDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -39,7 +40,7 @@ public interface StoreMapper {
|
||||
* 分页查询门店数据
|
||||
* @return
|
||||
*/
|
||||
List<StoreDO> list();
|
||||
List<StoreDO> list(@Param("isIot") Integer isIot);
|
||||
|
||||
List<StoreAreaDTO> getStoreAreaList( @Param("storeIds") List<String> storeIds);
|
||||
|
||||
@@ -47,4 +48,15 @@ public interface StoreMapper {
|
||||
|
||||
List<StoreAreaDTO> listStoreByRegionPathList(@Param("regionPathList") List<String> regionPathList);
|
||||
|
||||
/**
|
||||
* 批量新增或编辑最新订货时间
|
||||
* @param dtoList 门店最新订货时间DTO列表
|
||||
* @return int
|
||||
*/
|
||||
int batchInsertOrUpdateOrderTime(@Param("dtoList") List<StoreOrderTimeDTO> dtoList);
|
||||
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
List<StoreDO> getAllStoreIdAndNum(@Param("storeStatus") List<String> storeStatus);
|
||||
}
|
||||
|
||||
@@ -35,4 +35,11 @@ public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
|
||||
|
||||
MessageDetailVO getMessageDetail(Long id);
|
||||
|
||||
/**
|
||||
* 批量更新处理
|
||||
* @param id
|
||||
* @param storeCodeList
|
||||
*/
|
||||
int batchUpdateHandle(@Param("id") Long id, @Param("storeCodeList") List<String> storeCodeList);
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.mapper.store;
|
||||
|
||||
|
||||
import com.cool.store.entity.store.StoreMasterSignerInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2025-09-23 11:32
|
||||
*/
|
||||
public interface StoreMasterSignerInfoMapper {
|
||||
|
||||
/**
|
||||
* 根据门店id查询签约信息
|
||||
*/
|
||||
List<StoreMasterSignerInfoDO> selectByStoreIds(@Param("storeIds") List<String> storeIds);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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> {
|
||||
}
|
||||
@@ -38,6 +38,9 @@
|
||||
<if test="keyword!=null and keyword !=''">
|
||||
and region_name like CONCAT('%',#{keyword},'%')
|
||||
</if>
|
||||
<if test="joinBrand != null">
|
||||
and join_brand = #{joinBrand}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,departments,
|
||||
avatar, jobnumber, is_leader, is_leader_in_depts, face_url, user_status, create_time,
|
||||
third_oa_unique_flag
|
||||
</sql>
|
||||
@@ -82,6 +82,21 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getUserInfoByUserMobileList" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from
|
||||
enterprise_user_${enterpriseId}
|
||||
<where>
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" item="mobile" open="and mobile in (" close=")" separator=",">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="searchUserByRegionIdsAndKeyword" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -220,4 +235,10 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getUserLoginByUnionid" resultType="com.cool.store.entity.login.UserLoginDO">
|
||||
SELECT user_id, mobile, password
|
||||
FROM enterprise_user
|
||||
WHERE unionid = #{unionid} AND active = true
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -195,4 +195,23 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectLastBindRecord" resultType="com.cool.store.dto.wechat.ServiceAccountOpenIdDTO">
|
||||
select
|
||||
b.partner_id as partnerId,
|
||||
b.union_id as unionId,
|
||||
b.service_account_open_id as serviceAccountOpenId,
|
||||
MAX(b.update_time) as lastUpdateTime
|
||||
from xfsg_partner_user_info a
|
||||
left join xfsg_partner_user_wechat_bind b
|
||||
on a.partner_id = b.partner_id
|
||||
where b.partner_id is not null
|
||||
and service_account_open_id is not null
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" open="and mobile in (" close=")" separator="," item="mobile">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY b.partner_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -75,7 +75,11 @@
|
||||
publish_time as publishTime,
|
||||
publisher_user_id as publishUserId,
|
||||
create_user_id as createUserId,
|
||||
create_time as createTime
|
||||
create_time as createTime,
|
||||
handle_person_info as handlePersonInfo,
|
||||
jump_type as jumpType,
|
||||
jump_url as jumpUrl,
|
||||
store_info as storeInfo
|
||||
FROM zxjp_message_template
|
||||
WHERE deleted = 0
|
||||
<if test="request.moduleCode != null">
|
||||
@@ -127,4 +131,14 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getByKeyword" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM zxjp_message_template
|
||||
WHERE deleted = 0
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND handle_keyword = #{keyword,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -8,6 +8,8 @@
|
||||
<result column="open_id" property="openId" jdbcType="VARCHAR" />
|
||||
<result column="bind_time" property="bindTime" jdbcType="TIMESTAMP" />
|
||||
<result column="partner_id" property="partnerId" jdbcType="VARCHAR" />
|
||||
<result column="union_id" property="unionId" jdbcType="VARCHAR" />
|
||||
<result column="service_account_open_id" property="serviceAccountOpenId" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
</resultMap>
|
||||
@@ -17,15 +19,33 @@
|
||||
open_id,
|
||||
bind_time,
|
||||
partner_id,
|
||||
union_id,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{openId, jdbcType=VARCHAR},
|
||||
#{bindTime, jdbcType=TIMESTAMP},
|
||||
#{partnerId, jdbcType=VARCHAR},
|
||||
#{unionId, jdbcType=VARCHAR},
|
||||
#{createTime, jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
<set>
|
||||
<if test="unionId != null">
|
||||
union_id = #{unionId, jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByUnionId" >
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
set service_account_open_id = #{serviceAccountOpenId}
|
||||
where union_id = #{unionId}
|
||||
</update>
|
||||
|
||||
<select id="selectByPartnerAndOpenId" resultMap="BaseResultMap">
|
||||
select * from xfsg_partner_user_wechat_bind where partner_id = #{partnerId} and open_id = #{openId}
|
||||
</select>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -278,7 +279,11 @@
|
||||
from
|
||||
xfsg_shop_info a
|
||||
left join store_${enterpriseId} b on a.shop_code = b.store_num
|
||||
where b.store_id is not null and a.id in
|
||||
where a.shop_code is not null
|
||||
and a.shop_code !=''
|
||||
and b.store_id is not null
|
||||
and b.is_delete = 'effective'
|
||||
and a.id in
|
||||
<foreach collection="shopIds" item="shopId" separator="," open="(" close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
@@ -305,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
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
<result column="join_brand" property="joinBrand" jdbcType="TINYINT"/>
|
||||
<result column="store_type" property="storeType" jdbcType="TINYINT"/>
|
||||
<result column="mini_program_order_store_name" property="miniProgramOrderStoreName"/>
|
||||
<result column="is_iot" property="isIot" jdbcType="TINYINT"/>
|
||||
<result column="addressee_name" property="addresseeName" jdbcType="VARCHAR"/>
|
||||
<result column="addressee_mobile" property="addresseeMobile" jdbcType="VARCHAR"/>
|
||||
<result column="addressee_area" property="addresseeArea" jdbcType="VARCHAR"/>
|
||||
<result column="addressee_address" property="addresseeAddress" jdbcType="VARCHAR"/>
|
||||
<result column="branch" property="branch" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getByStoreId" resultMap="BaseResultMap">
|
||||
@@ -88,6 +94,15 @@
|
||||
</select>
|
||||
|
||||
<select id="listByMobile" resultMap="BaseResultMap">
|
||||
select a.*
|
||||
from store_${enterpriseId} a left join store_master_signer_info_${enterpriseId} b on a.store_id = b.store_id
|
||||
<where>
|
||||
and a.is_delete = 'effective'
|
||||
<if test="mobile!=null and mobile !=''">
|
||||
and ( b.signer1_mobile = #{mobile} or b.signer2_mobile = #{mobile})
|
||||
</if>
|
||||
</where>
|
||||
union
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
<where>
|
||||
@@ -99,37 +114,65 @@
|
||||
</select>
|
||||
|
||||
<select id="getSubStoreByRegionIdsAndMobile" resultType="com.cool.store.response.MiniShopsResponse">
|
||||
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
|
||||
from store_${enterpriseId}
|
||||
where is_delete = 'effective'
|
||||
<if test="storeName!=null and storeName!=''">
|
||||
and store_name like concat('%', #{storeName}, '%')
|
||||
</if>
|
||||
<if test="storeNum!=null and storeNum!=''">
|
||||
and store_num = #{storeNum}
|
||||
</if>
|
||||
and (
|
||||
<if test="regionIdList != null and regionIdList.size >0 ">
|
||||
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">
|
||||
region_path like concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="mobile!=null and mobile !=''">
|
||||
<choose>
|
||||
<when test="regionIdList != null and regionIdList.size >0 ">
|
||||
or `extend_field` like concat('%', #{mobile}, '%')
|
||||
</when>
|
||||
<otherwise>
|
||||
`extend_field` like concat('%', #{mobile}, '%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
)
|
||||
<choose>
|
||||
<!-- 情况1:regionIdList不为空,使用UNION优化 -->
|
||||
<when test="regionIdList != null and regionIdList.size > 0">
|
||||
SELECT store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
|
||||
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}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
|
||||
</if>
|
||||
<if test="storeNum!=null and storeNum!=''">
|
||||
AND a.store_num = #{storeNum}
|
||||
</if>
|
||||
AND (
|
||||
<foreach collection="regionIdList" item="regionId" separator=" OR ">
|
||||
a.region_path LIKE CONCAT('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
)
|
||||
|
||||
UNION
|
||||
|
||||
SELECT a.store_id as storeId, a.store_name as shopName, a.store_num as shopCode, a.store_address as detailAddress
|
||||
FROM store_${enterpriseId} a
|
||||
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}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
|
||||
</if>
|
||||
<if test="storeNum!=null and storeNum!=''">
|
||||
AND a.store_num = #{storeNum}
|
||||
</if>
|
||||
AND (b.signer1_mobile = #{mobile} OR b.signer2_mobile = #{mobile})
|
||||
</when>
|
||||
|
||||
<!-- 情况2:regionIdList为空,直接查询关联表 -->
|
||||
<otherwise>
|
||||
SELECT a.store_id as storeId, a.store_name as shopName, a.store_num as shopCode, a.store_address as detailAddress
|
||||
FROM store_${enterpriseId} a
|
||||
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}, '%') or a.store_num LIKE CONCAT('%', #{storeName}, '%'))
|
||||
</if>
|
||||
<if test="storeNum!=null and storeNum!=''">
|
||||
AND a.store_num = #{storeNum}
|
||||
</if>
|
||||
AND (b.signer1_mobile = #{mobile} OR b.signer2_mobile = #{mobile})
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="list" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId} where is_delete = 'effective' order by id asc
|
||||
from store_${enterpriseId}
|
||||
where is_delete = 'effective'
|
||||
<if test="isIot != null">
|
||||
AND is_iot = #{isIot}
|
||||
</if>
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="getStoreAreaList" resultType="com.cool.store.dto.store.StoreAreaDTO">
|
||||
@@ -179,4 +222,37 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertOrUpdateOrderTime">
|
||||
INSERT INTO store_extend_info_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
store_id,
|
||||
latest_order_time
|
||||
</trim>
|
||||
VALUES
|
||||
<foreach collection="dtoList" item="dto" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{dto.storeId},
|
||||
#{dto.latestOrderTime}
|
||||
</trim>
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
store_id = VALUES(store_id),
|
||||
latest_order_time = VALUES(latest_order_time),
|
||||
update_time = now(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="getAllStoreIdAndNum" resultType="com.cool.store.entity.StoreDO">
|
||||
SELECT store_id, store_num
|
||||
FROM store_${enterpriseId}
|
||||
WHERE is_delete = 'effective'
|
||||
<if test="storeStatus != null and !storeStatus.isEmpty()">
|
||||
AND store_status IN
|
||||
<foreach item="item" collection="storeStatus" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<result column="operator_list" property="operatorList" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO zxjp_store_message (
|
||||
store_id,
|
||||
store_code,
|
||||
@@ -160,9 +160,12 @@
|
||||
a.process_status as processStatus,
|
||||
a.create_time as createTime,
|
||||
b.module_code as moduleCode,
|
||||
b.matter_type as matterType,
|
||||
b.message_title as messageTitle,
|
||||
b.message_image as messageImage,
|
||||
b.today_task as todayTask
|
||||
b.today_task as todayTask,
|
||||
b.jump_type as jumpType,
|
||||
b.jump_url as jumpUrl
|
||||
from zxjp_store_message a
|
||||
left join zxjp_message_template b on a.message_template_id = b.id
|
||||
<where>
|
||||
@@ -205,7 +208,8 @@
|
||||
b.deadline as deadline,
|
||||
b.publisher_user_id as publishUserId,
|
||||
b.message_content as messageContent,
|
||||
b.process_type as processType
|
||||
b.process_type as processType,
|
||||
b.handle_keyword as handleKeyword
|
||||
from
|
||||
zxjp_store_message a
|
||||
left join zxjp_message_template b on a.message_template_id = b.id
|
||||
@@ -213,6 +217,24 @@
|
||||
a.id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="batchUpdateHandle">
|
||||
UPDATE zxjp_store_message
|
||||
SET
|
||||
process_status = 1,
|
||||
process_time = NOW(),
|
||||
read_status = 1,
|
||||
read_time = NOW(),
|
||||
update_time = NOW()
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND message_template_id = #{id}
|
||||
</if>
|
||||
and store_code IN
|
||||
<foreach item="item" collection="storeCodeList" index="index" separator="," close=")" open="(">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
and eu.active = true
|
||||
-- and sr.source = 'create'
|
||||
<if test="positionType != null and positionType != '' ">
|
||||
and sr.position_type = #{positionType}
|
||||
and (sr.position_type = #{positionType} or sr.id in (180000000,120000000,40000000,1762761165005))
|
||||
</if>
|
||||
and eu.user_status = '1'
|
||||
</select>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="positionType!=null and positionType!=''">
|
||||
and b.position_type =#{positionType}
|
||||
and (b.position_type =#{positionType} or b.id in (180000000,120000000,40000000,1762761165005))
|
||||
</if>
|
||||
<if test="notRoleAuth!=null and notRoleAuth!=''">
|
||||
and b.role_auth !=#{notRoleAuth}
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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.store.StoreMasterSignerInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreMasterSignerInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="signer1_name" jdbcType="VARCHAR" property="signer1Name" />
|
||||
<result column="signer1_mobile" jdbcType="VARCHAR" property="signer1Mobile" />
|
||||
<result column="signer1_id_card_no" jdbcType="VARCHAR" property="signer1IdCardNo" />
|
||||
<result column="signer1_id_card_front" jdbcType="VARCHAR" property="signer1IdCardFront" />
|
||||
<result column="signer1_id_card_back" jdbcType="VARCHAR" property="signer1IdCardBack" />
|
||||
<result column="signer2_name" jdbcType="VARCHAR" property="signer2Name" />
|
||||
<result column="signer2_mobile" jdbcType="VARCHAR" property="signer2Mobile" />
|
||||
<result column="signer2_id_card_no" jdbcType="VARCHAR" property="signer2IdCardNo" />
|
||||
<result column="signer2_id_card_front" jdbcType="VARCHAR" property="signer2IdCardFront" />
|
||||
<result column="signer2_id_card_back" jdbcType="VARCHAR" property="signer2IdCardBack" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, store_id, signer1_name, signer1_mobile, signer1_id_card_no, signer1_id_card_front,
|
||||
signer1_id_card_back, signer2_name, signer2_mobile, signer2_id_card_no, signer2_id_card_front,
|
||||
signer2_id_card_back, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByStoreIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from store_master_signer_info_${enterpriseId}
|
||||
where store_id in
|
||||
<foreach item="storeId" collection="storeIds" open="(" separator="," close=")">
|
||||
#{storeId}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user