Merge branch 'master' into cc_2250513_api

This commit is contained in:
苏竹红
2025-05-13 14:59:49 +08:00
47 changed files with 1577 additions and 238 deletions

View File

@@ -54,6 +54,17 @@ public class BuildInformationDAO {
}
return buildInformationMapper.getSpecificByShopIdList(shopIdList);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/12
* @description:数据处理用初始化 批量插入新数据
*/
public Integer batchInsertSpecific(List<Long> shopIds) {
if (CollectionUtils.isEmpty(shopIds)) {
return 0;
}
return buildInformationMapper.batchInsertSpecific(shopIds);
}
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.dao;
import com.cool.store.entity.FranchiseFeeDO;
import com.cool.store.mapper.FranchiseFeeMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/05/12/13:53
* @Version 1.0
* @注释:
*/
@Repository
public class FranchiseFeeDAO {
@Resource
private FranchiseFeeMapper franchiseFeeMapper;
public Integer updateBill( List<FranchiseFeeDO> list){
if (CollectionUtils.isEmpty(list)){
return 0;
}
return franchiseFeeMapper.updateBill(list);
}
}

View File

@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
@@ -106,4 +107,10 @@ public class HyPartnerUserInfoDAO {
}
return hyPartnerUserInfoMapper.dataHandle(hyPartnerUserInfoDOList);
}
public List<HyPartnerUserInfoDO> selectPasswordIsNull(){
Example example = new Example(HyPartnerUserInfoDO.class);
example.createCriteria().andIsNull("downstreamSystemPassword");
return hyPartnerUserInfoMapper.selectByExample(example);
}
}

View File

@@ -29,24 +29,57 @@ public class OrderSysInfoDAO {
public OrderSysInfoDO selectByShopId(Long shopId) {
Example example = new Example(OrderSysInfoDO.class);
example.createCriteria().andEqualTo("shopId",shopId);
example.createCriteria().andEqualTo("shopId", shopId);
return orderSysInfoMapper.selectOneByExample(example);
}
public Integer updateByShopId(OrderSysInfoDO orderSysInfoDO) {
Example example = new Example(OrderSysInfoDO.class);
example.createCriteria().andEqualTo("shopId",orderSysInfoDO.getShopId());
return orderSysInfoMapper.updateByExampleSelective(orderSysInfoDO,example);
example.createCriteria().andEqualTo("shopId", orderSysInfoDO.getShopId());
return orderSysInfoMapper.updateByExampleSelective(orderSysInfoDO, example);
}
//只获取特定几个字段值
public List<OrderSysInfoDO> getSpecificByShopIdList(List<Long> shopIdList){
if (CollectionUtils.isEmpty(shopIdList)){
return new ArrayList<>();
public List<OrderSysInfoDO> getSpecificByShopIdList(List<Long> shopIdList) {
if (CollectionUtils.isEmpty(shopIdList)) {
return new ArrayList<>();
}
return orderSysInfoMapper.getSpecificByShopIdList(shopIdList);
}
public Integer updateAddresseeAddress(OrderSysInfoDO orderSysInfoDO){
public Integer updateAddresseeAddress(OrderSysInfoDO orderSysInfoDO) {
return orderSysInfoMapper.updateAddresseeAddress(orderSysInfoDO);
}
public List<OrderSysInfoDO> selectByShopIdList(List<Long> shopIdList) {
if (CollectionUtils.isEmpty(shopIdList)) {
return new ArrayList<>();
}
Example example = new Example(OrderSysInfoDO.class);
example.createCriteria().andIn("shopId", shopIdList);
return orderSysInfoMapper.selectByExample(example);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/12
* @description:数据处理专用插入特定字段
*/
public Integer batchInsertSpecific(List<OrderSysInfoDO> orderSysInfoDOList) {
if (CollectionUtils.isEmpty(orderSysInfoDOList)) {
return 0;
}
return orderSysInfoMapper.batchInsertSpecific(orderSysInfoDOList);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/12
* @description:数据处理专用update特定字段
*/
public Integer batchUpdateSpecific(List<OrderSysInfoDO> orderSysInfoDOList) {
if (CollectionUtils.isEmpty(orderSysInfoDOList)) {
return 0;
}
return orderSysInfoMapper.batchUpdateSpecific(orderSysInfoDOList);
}
}

View File

@@ -1,5 +1,8 @@
package com.cool.store.dao;
import com.alibaba.excel.util.CollectionUtils;
import com.aliyun.openservices.shade.com.google.common.collect.Lists;
import com.cool.store.constants.CommonConstants;
import com.cool.store.entity.PointDetailInfoDO;
import com.cool.store.mapper.PointDetailInfoMapper;
import org.springframework.stereotype.Repository;
@@ -61,10 +64,24 @@ public class PointDetailInfoDAO {
}
public List<PointDetailInfoDO> getByPointIdList(List<Long> pointIdList) {
if (CollectionUtils.isEmpty(pointIdList)){
return Lists.newArrayList();
}
Example example = new Example(PointDetailInfoDO.class);
example.createCriteria().andIn("point_id", pointIdList);
example.createCriteria().andIn("pointId", pointIdList);
return pointDetailInfoMapper.selectByExample(example);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/9
* @description: 数据处理用 面积 租金
*/
public Integer updateMonthRent(List<PointDetailInfoDO> list) {
if (CollectionUtils.isEmpty(list)){
return CommonConstants.ZERO;
}
return pointDetailInfoMapper.updateMonthRent(list);
}
}

View File

@@ -156,4 +156,16 @@ public class PointInfoDAO {
}
return pointInfoMapper.getShopByOpportunityPointCode(eid,code);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/9
* @description:数据处理用 省市区详细地址面积
*/
public Integer updateAddress(List<PointInfoDO> list){
if (CollectionUtils.isEmpty(list)){
return CommonConstants.ZERO;
}
return pointInfoMapper.updateAddress(list);
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.alibaba.excel.util.CollectionUtils;
import com.cool.store.entity.BuildInformationDO;
import com.cool.store.entity.PosAndOrderInfoDO;
import com.cool.store.mapper.PosAndOrderInfoMapper;
@@ -7,6 +8,7 @@ import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
@@ -40,4 +42,16 @@ public class PosAndOrderInfoDAO {
example.createCriteria().andEqualTo("shopId",shopId).andEqualTo("type",type);
return posAndOrderInfoMapper.selectOneByExample(example);
}
public List<PosAndOrderInfoDO> selectListByShopIdAndType(List<Long> shopIds, Integer type) {
Example example = new Example(PosAndOrderInfoDO.class);
example.createCriteria().andIn("shopId",shopIds).andEqualTo("type",type);
return posAndOrderInfoMapper.selectByExample(example);
}
public Integer batchInsert(List<PosAndOrderInfoDO> posAndOrderInfoDOList){
if(CollectionUtils.isEmpty(posAndOrderInfoDOList)){
return 0;
}
return posAndOrderInfoMapper.batchInsert(posAndOrderInfoDOList);
}
}

View File

@@ -162,4 +162,11 @@ public class ShopAccountDAO {
return shopAccountMapper.getPasswordIsNull();
}
//数据处理用平台账号 火马,云流水,新掌柜状态改为已完成
public Integer updateStatusDataHandle(List<Long> shopIds){
if (CollectionUtils.isEmpty(shopIds)){
return CommonConstants.ZERO;
}
return shopAccountMapper.updateStatusDataHandle(shopIds);
}
}

View File

@@ -284,4 +284,10 @@ public class ShopInfoDAO {
}
return shopInfoMapper.updateShopCity(list);
}
public List<ShopInfoDO> selectByShopCodeList(List<String> shopCodeList){
Example example = new Example(ShopInfoDO.class);
example.createCriteria().andIn("shopCode", shopCodeList).andEqualTo("deleted", false);
return shopInfoMapper.selectByExample(example);
}
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.dao;
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.ShopStageInfoDO;
@@ -21,10 +22,7 @@ import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* @author zhangchenbiao
@@ -169,6 +167,16 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
}
//数据处理专用
public Integer dataUpdateShopStageInfo(List<BuildStageDTO> list, ShopSubStageStatusEnum shopStageInfo) {
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
return CommonConstants.ZERO;
}
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
boolean isTerminated = shopStageInfo.isTerminated();
return shopStageInfoMapper.dataUpdateShopStageInfo(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
}
/**
* 批量更新店铺状态
@@ -429,4 +437,24 @@ public class ShopStageInfoDAO {
}
return shopStageInfoMapper.getShopSubStages(shopIds);
}
//数据处理专用
public Integer dataUpdateStatus(List<Long> list, ShopSubStageStatusEnum shopStageInfo) {
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
return CommonConstants.ZERO;
}
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
boolean isTerminated = shopStageInfo.isTerminated();
return shopStageInfoMapper.dataUpdateStatus(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
}
//数据处理专用
public Integer dataUpdateAcceptanceStatus(List<Long> list, ShopSubStageStatusEnum shopStageInfo) {
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
return CommonConstants.ZERO;
}
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
boolean isTerminated = shopStageInfo.isTerminated();
return shopStageInfoMapper.dataUpdateAcceptanceStatus(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
}
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.dao;
import com.alibaba.excel.util.CollectionUtils;
import com.cool.store.entity.SignFranchiseDO;
import com.cool.store.mapper.SignFranchiseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/05/12/13:55
* @Version 1.0
* @注释:
*/
@Repository
public class SignFranchiseDAO {
@Resource
private SignFranchiseMapper signFranchiseMapper;
public Integer updateSpecific(List<SignFranchiseDO> list){
if (CollectionUtils.isEmpty(list)){
return 0;
}
return signFranchiseMapper.updateSpecific(list);
}
}

View File

@@ -17,6 +17,8 @@ public interface BuildInformationMapper extends Mapper<BuildInformationDO> {
List<BuildInformationDO> getSpecificByShopIdList(@Param("list") List<Long> shopIdList);
Integer batchInsertSpecific(@Param("list") List<Long> shopIds);
}

View File

@@ -16,4 +16,12 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
List<FranchiseFeeDTO> getPayTimeByShopIds(@Param("shopIds") List<Long> shopIds);
Integer updateDataHandleServiceV25();
List<FranchiseFeeDO> getFranchiseFeeByShopIds(@Param("shopIds") List<Long> shopIds);
/**
* @Auther: wangshuo
* @Date: 2025/5/12
* @description: 数据处理修改账单
*/
Integer updateBill(@Param("list") List<FranchiseFeeDO> list);
}

View File

@@ -11,7 +11,7 @@ import java.util.List;
* @date 2023-05-29 03:53
*/
@Mapper
public interface HyPartnerUserInfoMapper {
public interface HyPartnerUserInfoMapper extends tk.mybatis.mapper.common.Mapper<HyPartnerUserInfoDO> {
/**
*
* 默认插入方法,只会给有值的字段赋值

View File

@@ -19,4 +19,7 @@ public interface OrderSysInfoMapper extends Mapper<OrderSysInfoDO> {
Integer updateAddresseeAddress(@Param("update") OrderSysInfoDO orderSysInfoDO);
Integer batchInsertSpecific(@Param("list") List<OrderSysInfoDO> orderSysInfoDOList);
Integer batchUpdateSpecific(@Param("list") List<OrderSysInfoDO> orderSysInfoDOList);
}

View File

@@ -4,6 +4,8 @@ import com.cool.store.entity.PointDetailInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface PointDetailInfoMapper extends Mapper<PointDetailInfoDO> {
/**
@@ -26,4 +28,6 @@ public interface PointDetailInfoMapper extends Mapper<PointDetailInfoDO> {
* @return
*/
Integer updatePartFieldPointDetail(@Param("update") PointDetailInfoDO update);
Integer updateMonthRent(@Param("list") List<PointDetailInfoDO> list);
}

View File

@@ -119,4 +119,6 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
List<PointInfoDTO> getPointAndDetailByIds(@Param("pointIds") List<Long> pointIds);
Integer updateAddress(List<PointInfoDO> list);
}

View File

@@ -2,8 +2,11 @@ package com.cool.store.mapper;
import com.cool.store.entity.PosAndOrderInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
* @author EDY
* @description 针对表【xfsg_pos_and_order_info(pos/订货系统表)】的数据库操作Mapper
@@ -12,6 +15,7 @@ import tk.mybatis.mapper.common.Mapper;
*/
public interface PosAndOrderInfoMapper extends Mapper<PosAndOrderInfoDO> {
Integer batchInsert(@Param("list") List<PosAndOrderInfoDO> posAndOrderInfoDOList);
}

View File

@@ -99,6 +99,7 @@ public interface ShopAccountMapper extends Mapper<ShopAccountDO> {
//数据处理用
List<Long> getPasswordIsNull();
Integer updateStatusDataHandle(@Param("list") List<Long> shopIds);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.BuildStageDTO;
import com.cool.store.dto.PlatformBuildStageDTO;
import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.entity.ShopStageInfoDO;
@@ -11,6 +12,7 @@ import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.Date;
import java.util.List;
public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
@@ -61,6 +63,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
Integer dataUpdateShopStageInfo(@Param("list") List<BuildStageDTO> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
/**
* 批量更新阶段及审核信息
* @param shopId
@@ -171,4 +177,11 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
Integer getAllNumber(@Param("shopId") Long shopId,@Param("flag")Integer flag);
List<ShopStageInfoDO> getShopSubStages(@Param("shopIds") List<Long> shopIds);
Integer dataUpdateStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
Integer dataUpdateAcceptanceStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
}

View File

@@ -15,4 +15,12 @@ public interface SignFranchiseMapper extends Mapper<SignFranchiseDO> {
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
Integer dateHandle();
List<SignFranchiseDO> selectAllByShopIds(@Param("list")List<Long> shopIds);
/**
* @Auther: wangshuo
* @Date: 2025/5/12
* @description:数据处理用修改特定字段
*/
Integer updateSpecific(@Param("list") List<SignFranchiseDO> list);
}

View File

@@ -53,6 +53,12 @@
create_time,update_time,create_user,
update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner
</sql>
<insert id="batchInsertSpecific">
<foreach collection="list" item="item" index="index" separator=";">
insert into xfsg_build_information (shop_id)
VALUE(#{item})
</foreach>
</insert>
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
select shop_id as shopId, c_shop_name as cShopName
from xfsg_build_information

View File

@@ -6,6 +6,32 @@
set first_year_fee = "6000",
first_year_manage_fee = "7200"
</update>
<update id="updateBill">
<foreach collection="list" item="item" index="index" separator=";">
update xfsg_franchise_fee
<set>
<if test="item.yearFranchiseFee !=null and item.yearFranchiseFee!=''">
year_franchise_fee = #{item.yearFranchiseFee},
</if>
<if test="item.firstYearManageFee !=null and item.firstYearManageFee!=''">
first_year_manage_fee = #{item.firstYearManageFee},
</if>
<if test="item.firstYearFee!=null and item.firstYearFee!=''">
first_year_fee= #{item.firstYearFee},
</if>
<if test="item.loanMargin !=null and item.loanMargin!=''">
loan_margin = #{item.loanMargin},
</if>
<if test="item.performanceBond !=null and item.performanceBond!=''">
performance_bond = #{item.performanceBond},
</if>
<if test="item.discountReason !=null and item.discountReason!=''">
discount_reason = #{item.discountReason},
</if>
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
select *
@@ -34,5 +60,13 @@
#{shopId}
</foreach>
</select>
<select id="getFranchiseFeeByShopIds" resultType="com.cool.store.entity.FranchiseFeeDO">
select *
from xfsg_franchise_fee
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
#{shopId}
</foreach>
</select>
</mapper>

View File

@@ -41,6 +41,21 @@
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user,
declare_goods_type
</sql>
<insert id="batchInsertSpecific">
<foreach collection="list" item="item" index="index" separator=";">
insert into xfsg_order_sys_info (
shop_id,addressee_province,addressee_city,addressee_district,addressee_address,declare_goods_logistics_warehouse,receiving_ms_bank_account)
values(
#{item.shopId},
#{item.addresseeProvince},
#{item.addresseeCity},
#{item.addresseeDistrict},
#{item.addresseeAddress},
#{item.declareGoodsLogisticsWarehouse},
#{item.receivingMsBankAccount}
)
</foreach>
</insert>
<update id="updateAddresseeAddress">
update xfsg_order_sys_info
<set>
@@ -59,6 +74,33 @@
</set>
where shop_id = #{update.shopId}
</update>
<update id="batchUpdateSpecific">
<foreach collection="list" separator=";" index="index" item="item">
update xfsg_order_sys_info
<set>
<if test="item.addresseeAddress != null and item.addresseeAddress != ''">
addressee_address = #{item.addresseeAddress},
</if>
<if test="item.addresseeProvince !=null and item.addresseeProvince != ''">
addressee_province = #{item.addresseeProvince},
</if>
<if test="item.addresseeCity !=null and item.addresseeCity != ''">
addressee_city = #{item.addresseeCity},
</if>
<if test="item.addresseeDistrict !=null and item.addresseeDistrict != ''">
addressee_district = #{item.addresseeDistrict},
</if>
<if test="item.declareGoodsLogisticsWarehouse !=null and item.declareGoodsLogisticsWarehouse != ''">
declare_goods_logistics_warehouse = #{item.declareGoodsLogisticsWarehouse},
</if>
<if test="item.receivingMsBankAccount !=null and item.receivingMsBankAccount != ''">
receiving_ms_bank_account = #{item.receivingMsBankAccount},
</if>
order_update_time = now()
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
select
shop_id as shopId,

View File

@@ -130,5 +130,17 @@
picture_obj = #{update.pictureObj}
where id = #{update.id}
</update>
<update id="updateMonthRent">
<foreach collection="list" separator=";" index="index" item="item">
update xfsg_point_detail_info
<set>
<if test="item.monthRent != null">
month_rent = #{item.monthRent},
</if>
update_time = now()
</set>
where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -80,7 +80,8 @@
left join store_${eid} c on b.shop_code = c.store_num
where a.deleted = 0 and a.development_manager = #{request.developmentManager}
<if test="request.keyword != null and request.keyword != ''">
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
#{request.keyword},
'%'))
</if>
<if test="request.developmentStartTime != null and request.developmentStartTime != ''">
@@ -114,7 +115,8 @@
</foreach>
</if>
<if test="request.areaCode!=null and request.areaCode!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
order by a.id desc
</select>
@@ -185,7 +187,8 @@
left join store_${eid} c on b.shop_code = c.store_num
where a.deleted = 0 and a.point_status in (4,5,6,7)
<if test="request.keyword != null and request.keyword != ''">
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
#{request.keyword},
'%'))
</if>
<if test="request.developmentManager != null and request.developmentManager != ''">
@@ -216,7 +219,8 @@
and a.storage_status = #{request.storageStatus}
</if>
<if test="request.areaCode!=null and request.areaCode!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
order by a.id desc
</select>
@@ -297,11 +301,11 @@
from xfsg_point_info a
LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
where a.deleted = 0
<if test = "request.keyword!=null and request.keyword !=''">
and a.point_name like concat('%', #{request.keyword}, '%')
<if test="request.keyword!=null and request.keyword !=''">
and a.point_name like concat('%', #{request.keyword}, '%')
</if>
<if test = "request.type == 1">
and a.point_status in( 4,5)
<if test="request.type == 1">
and a.point_status in( 4,5)
</if>
<if test="request.type == 2">
and a.line_id = #{request.lineId}
@@ -354,5 +358,20 @@
point_location = #{request.pointLocation}
where id = #{request.id}
</update>
<update id="updateAddress">
<foreach collection="list" item="item" index="index" separator=";">
update xfsg_point_info
<set>
<if test="item.province != null and item.province !=''">province = #{item.province},</if>
<if test="item.address !=null and item.address !=''">address = #{item.address},</if>
<if test="item.city !=null and item.city !=''">city = #{item.city},</if>
<if test="item.district !=null and item.district !=''">district = #{item.district},</if>
<if test="item.pointArea !=null and item.pointArea!=''">
point_area = #{item.pointArea}
</if>
</set>
where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -20,4 +20,10 @@
account,password,remark,
create_time,create_user
</sql>
<insert id="batchInsert">
<foreach collection="list" separator=";" index="index" item="item">
insert into xfsg_pos_and_order_info (shop_id,type,account,password,remark,create_time,create_user)
values (#{item.shopId},#{item.type},#{item.account},#{item.password},#{item.remark},#{item.createTime},#{item.createUser})
</foreach>
</insert>
</mapper>

View File

@@ -1,203 +1,216 @@
<?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.ShopAccountMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopAccountDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="system_name" jdbcType="VARCHAR" property="systemName" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="bound_phone" jdbcType="VARCHAR" property="boundPhone" />
<result column="password_salt" jdbcType="VARCHAR" property="passwordSalt" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="status" jdbcType="BIT" property="status" />
<result column="entry_status" jdbcType="TINYINT" property="entryStatus" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="last_sync_time" jdbcType="TIMESTAMP" property="lastSyncTime" />
<result column="secondary_password" jdbcType="VARCHAR" property="secondaryPassword" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopAccountDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="system_name" jdbcType="VARCHAR" property="systemName"/>
<result column="account" jdbcType="VARCHAR" property="account"/>
<result column="bound_phone" jdbcType="VARCHAR" property="boundPhone"/>
<result column="password_salt" jdbcType="VARCHAR" property="passwordSalt"/>
<result column="password" jdbcType="VARCHAR" property="password"/>
<result column="status" jdbcType="BIT" property="status"/>
<result column="entry_status" jdbcType="TINYINT" property="entryStatus"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="last_sync_time" jdbcType="TIMESTAMP" property="lastSyncTime"/>
<result column="secondary_password" jdbcType="VARCHAR" property="secondaryPassword"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
</resultMap>
<!-- 批量新增 -->
<insert id="batchInsert">
INSERT INTO xfsg_shop_account (
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
last_sync_time,
secondary_password,
remark
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.shopId},
#{item.systemName},
#{item.account},
#{item.boundPhone},
#{item.passwordSalt},
#{item.password},
#{item.status},
#{item.entryStatus},
#{item.lastSyncTime},
#{item.secondaryPassword},
#{item.remark}
)
</foreach>
</insert>
<!-- 批量新增 -->
<insert id="batchInsert">
INSERT INTO xfsg_shop_account (
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
last_sync_time,
secondary_password,
remark
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.shopId},
#{item.systemName},
#{item.account},
#{item.boundPhone},
#{item.passwordSalt},
#{item.password},
#{item.status},
#{item.entryStatus},
#{item.lastSyncTime},
#{item.secondaryPassword},
#{item.remark}
)
</foreach>
</insert>
<!-- 根据shopId查询多条数据 -->
<select id="selectByShopId" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
order by id
</select>
<!-- 根据shopId查询多条数据 -->
<select id="selectByShopId" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
order by id
</select>
<select id="selectByShopIdAndSystemName" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
and system_name = #{systemName}
</select>
<select id="selectByShopIdAndSystemName" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
and system_name = #{systemName}
</select>
<!-- 根据shopId与system_name修改status -->
<update id="updateStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
<set>
<if test="status != null">
status = #{status},
</if>
<if test="syncTime != null">
last_sync_time = #{syncTime},
</if>
<if test="ylsCode != null">
account = #{ylsCode},
</if>
</set>
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<!-- 根据shopId与system_name修改status -->
<update id="updateStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
<set>
<if test="status != null">
status = #{status},
</if>
<if test="syncTime != null">
last_sync_time = #{syncTime},
</if>
<if test="ylsCode != null">
account = #{ylsCode},
</if>
</set>
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateEntryStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
entry_status = #{entryStatus,jdbcType=BIT}
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateEntryStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
entry_status = #{entryStatus,jdbcType=BIT}
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateAccountByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
account = #{account},
password = #{password},
status = #{status}
WHERE
shop_id = #{shopId}
AND system_name = #{systemName}
</update>
<update id="updateAccountByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
account = #{account},
password = #{password},
status = #{status}
WHERE
shop_id = #{shopId}
AND system_name = #{systemName}
</update>
<!-- 批量修改密码和密码盐 -->
<update id="batchUpdatePasswordByShopIds">
UPDATE
xfsg_shop_account
SET
password = #{password},
secondary_password = #{secondaryPassword},
password_salt = #{passwordSalt},
last_sync_time = #{lastSyncTime,jdbcType=TIMESTAMP}
WHERE
system_name in ('火码POS','云流水','新掌柜')
and shop_id IN
<foreach close=")" collection="shopIds" item="shopId" open="(" separator=",">
#{shopId}
</foreach>
</update>
<!-- 批量修改密码和密码盐 -->
<update id="batchUpdatePasswordByShopIds">
UPDATE
xfsg_shop_account
SET
password = #{password},
secondary_password = #{secondaryPassword},
password_salt = #{passwordSalt},
last_sync_time = #{lastSyncTime,jdbcType=TIMESTAMP}
WHERE
system_name in ('火码POS','云流水','新掌柜')
and shop_id IN
<foreach close=")" collection="shopIds" item="shopId" open="(" separator=",">
#{shopId}
</foreach>
</update>
<update id="dateHandle">
<foreach collection="list" item="item" separator=";">
<foreach collection="list" item="item" separator=";">
update xfsg_shop_account
<set>
<if test="item.passwordSalt != null">
password_salt = #{item.passwordSalt},
</if>
<if test="item.password != null">
password = #{item.password},
</if>
<if test="item.secondaryPassword != null">
secondary_password = #{item.secondaryPassword},
</if>
</set>
where id = #{item.id}
</foreach>
</update>
<update id="updateStatusDataHandle">
update xfsg_shop_account
<set>
<if test="item.passwordSalt != null">
password_salt = #{item.passwordSalt},
</if>
<if test="item.password != null">
password = #{item.password},
</if>
<if test="item.secondaryPassword != null">
secondary_password = #{item.secondaryPassword},
</if>
status = 5
</set>
where id = #{item.id}
</foreach>
where
shop_id in
<foreach collection="list" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
and system_name in ('火码POS','云流水','新掌柜')
</update>
<select id="getALlFail">
select * from xfsg_shop_account WHERE
system_name in ('火码POS')
and status = 6
</select>
<select id="getSpecificByShopIds" resultType="com.cool.store.entity.ShopAccountDO">
select shop_id as shopId,system_name as systemName,status from xfsg_shop_account
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
select * from xfsg_shop_account WHERE
system_name in ('火码POS')
and status = 6
</select>
<select id="getPasswordIsNull" resultType="java.lang.Long">
SELECT shop_id as shopId FROM xfsg_shop_account
WHERE `password` is null and `system_name` = '火码POS'
<select id="getSpecificByShopIds" resultType="com.cool.store.entity.ShopAccountDO">
select shop_id as shopId,system_name as systemName,status from xfsg_shop_account
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
</select>
<select id="getPasswordIsNull" resultType="java.lang.Long">
SELECT shop_id as shopId FROM xfsg_shop_account
WHERE `password` is null and `system_name` = '火码POS'
</select>
</select>
</mapper>

View File

@@ -501,7 +501,7 @@
</update>
<update id="updateShopCity">
<foreach collection="list" item="item" index="index" separator=";">
update xfsg_shop_info set province =#{item.province}, city = #{item.city}, district=#{item.district} where id = #{item.id}
update xfsg_shop_info set shop_name = #{item.shopName}, province =#{item.province}, city = #{item.city}, district=#{item.district}, detail_address = #{item.detailAddress} where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -185,6 +185,52 @@
and shop_sub_stage = #{update.shopSubStage}
</foreach>
</update>
<update id="dataUpdateShopStageInfo">
<foreach collection="list" item="item" separator=";">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark},
actual_complete_time = #{item.endTime}
where
shop_id = #{item.shopId}
and shop_sub_stage = #{shopSubStage}
</foreach>
</update>
<update id="dataUpdateStatus">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark},
actual_complete_time = now()
where
shop_id in
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
and shop_sub_stage = #{shopSubStage}
and shop_sub_stage_status != #{shopSubStageStatus}
</update>
<update id="dataUpdateAcceptanceStatus">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark}
where
shop_id in
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
and shop_sub_stage = #{shopSubStage}
and shop_sub_stage_status = -100
</update>
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
select

View File

@@ -10,6 +10,44 @@
update xfsg_sign_franchise
set sign_type = 1
</update>
<update id="updateSpecific">
<foreach collection="list" separator=";" item ="item" index="index">
update xfsg_sign_franchise
<set>
<if test="item.contractCode != null">
contract_code = #{item.contractCode},
</if>
<if test="item.contractStartTime != null">
contract_start_time = #{item.contractStartTime},
</if>
<if test="item.contractEndTime != null">
contract_end_time = #{item.contractEndTime},
</if>
<if test="item.partnershipSignatorySecond != null and item.partnershipSignatorySecond != ''">
partnership_signatory_second = #{item.partnershipSignatorySecond},
</if>
<if test="item.partnershipSignatorySecondIdNumber != null and item.partnershipSignatorySecondIdNumber!=''">
partnership_signatory_second_id_number = #{item.partnershipSignatorySecondIdNumber},
</if>
<if test="item.partnershipSignatorySecondMobile !=null and item.partnershipSignatorySecondMobile != '' ">
partnership_signatory_second_mobile = #{item.partnershipSignatorySecondMobile},
</if>
<if test="item.introductionAward !=null and item.introductionAward !=''">
introduction_award = #{item.introductionAward},
</if>
<if test="item.introduceStore !=null and item.introduceStore!=''">
introduce_store = #{item.introduceStore},
</if>
<if test="item.introducer!=null and item.introducer!=''">
introducer = #{item.introducer},
</if>
<if test="item.protectiveDistance!=null">
protective_distance = #{item.protectiveDistance},
</if>
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.SignFranchiseDO">
select *
from xfsg_sign_franchise
@@ -28,4 +66,11 @@
</foreach>
</if>
</select>
<select id="selectAllByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
select * from xfsg_sign_franchise
where shop_id in
<foreach collection="list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
</select>
</mapper>