Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
zhangchenbiao
2024-03-28 20:26:02 +08:00
55 changed files with 2511 additions and 63 deletions

View File

@@ -147,4 +147,7 @@ public class CommonConstants {
public static final String FOLLOW_TASK_NOTICE_KEY = "follow_task_notice:{0}:{1}";
public static final Long LONG_ONE = 1L;
}

View File

@@ -78,6 +78,7 @@ public enum ErrorCodeEnum {
INVESTMENT_MANAGER_NOT_EXIST(500016, "当前招商经理不存在", null),
PARTNER_MOBILE_EXIST_0(500017, "手机号码已存在", null),
TIME_OCCUPIED(500018, "预约时间被占用", null),
LINE_PAY_IS_NOT_EXIST(500019, "意向金信息不存在!", null),
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
@@ -135,6 +136,8 @@ public enum ErrorCodeEnum {
OPEN_AREA_IS_NOT_EXISTS(107006, "意向区域城市不存在", null),
REGION_NOT_EXIST(108001, "区域不存在",null),
;

View File

@@ -19,6 +19,9 @@ public class RedisConstantUtil {
@Value("${spring.profiles.active}")
private String active;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
/**
* 获取钉钉同步区域key
*
@@ -87,7 +90,7 @@ public class RedisConstantUtil {
return active + "_" + RedisConstant.GUIDE_INFO + eid + ":" + menuId;
}
public String getRegionNameListKey(String eid, String regionId) {
public String getRegionNameListKey(String regionId) {
return active + "_" + RedisConstant.REGION_ALL_NAME_CACHE + eid + ":" + regionId;
}

View File

@@ -0,0 +1,40 @@
package com.cool.store.dao;
import com.cool.store.entity.BankdocDO;
import com.cool.store.entity.BanktypeDO;
import com.cool.store.mapper.BankdocMapper;
import com.cool.store.mapper.BanktypeMapper;
import com.cool.store.request.BranchBankPageRequest;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @author wxp
* @FileName: BankDAO
* @Description:
* @date 2024-03-19 10:49
*/
@Slf4j
@Repository
public class BankDAO {
@Resource
private BanktypeMapper banktypeMapper;
@Resource
private BankdocMapper bankdocMapper;
public List<BanktypeDO> listBank() {
List<BanktypeDO> bankList = banktypeMapper.listBank();
return bankList;
}
public Page<BankdocDO> listBranchBank(BranchBankPageRequest request){
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return bankdocMapper.listBranchBank(request);
}
}

View File

@@ -88,4 +88,8 @@ public class LineInfoDAO {
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,userId,wantShopAreaIds);
return lineInfo;
}
public void insertOrUpdate(LineInfoDO lineInfoParam){
lineInfoMapper.insertOrUpdate(lineInfoParam);
}
}

View File

@@ -0,0 +1,41 @@
package com.cool.store.dao;
import com.cool.store.entity.LinePayDO;
import com.cool.store.mapper.LinePayMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @author wxp
* @FileName: LinePayDAO
* @Description:提交意向金
* @date 2024-03-27 14:33
*/
@Slf4j
@Repository
public class LinePayDAO {
@Resource
private LinePayMapper linePayMapper;
public LinePayDO getLinePayByLineId(Long lineId) {
LinePayDO linePayDO = linePayMapper.getLinePayByLineId(lineId);
return linePayDO;
}
public Long addLinePay(LinePayDO linePayDO){
linePayMapper.insertSelective(linePayDO);
return linePayDO.getId();
}
public Integer updateLinePay(LinePayDO linePayDO){
if(Objects.isNull(linePayDO)){
return 0;
}
return linePayMapper.updateByPrimaryKeySelective(linePayDO);
}
}

View File

@@ -0,0 +1,51 @@
package com.cool.store.dao;
import com.cool.store.entity.RegionAreaConfigDO;
import com.cool.store.mapper.RegionAreaConfigMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
/**
* @author wxp
* @ClassName RegionAreaConfigDao
* @Description 用一句话描述什么
*/
@Repository
public class RegionAreaConfigDao {
@Resource
private RegionAreaConfigMapper regionAreaConfigMapper;
public void deleteRegionAreaConfigByRegionId(Long regionId) {
if (regionId == null) {
return;
}
regionAreaConfigMapper.deleteRegionAreaConfigByRegionId(regionId);
}
public void batchInsertOrUpdateRegionAreaConfig(List<RegionAreaConfigDO> regionAreaConfigList) {
if (CollectionUtils.isEmpty(regionAreaConfigList)) {
return;
}
regionAreaConfigMapper.batchInsertOrUpdateRegionAreaConfig(regionAreaConfigList);
}
public List<RegionAreaConfigDO> listAreaByRegionId(Long regionId){
if (regionId == null) {
return Collections.emptyList();
}
return regionAreaConfigMapper.listAreaByRegionId(regionId);
}
public Long getByWantShopAreaId(Long wantShopAreaId){
if (wantShopAreaId == null) {
return 0L;
}
return regionAreaConfigMapper.getByWantShopAreaId(wantShopAreaId);
}
}

View File

@@ -0,0 +1,32 @@
package com.cool.store.dao;
import com.cool.store.entity.RegionQrcodeConfigDO;
import com.cool.store.mapper.RegionQrcodeConfigMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @author wxp
* @ClassName RegionDao
* @Description 用一句话描述什么
*/
@Repository
public class RegionQrcodeConfigDao {
@Resource
private RegionQrcodeConfigMapper regionQrcodeConfigMapper;
public String getPayPicByRegionId(Long regionId) {
if ( Objects.isNull(regionId)) {
return "";
}
RegionQrcodeConfigDO regionQrcodeConfigDO = regionQrcodeConfigMapper.getByRegionId(regionId);
if(regionQrcodeConfigDO != null){
return regionQrcodeConfigDO.getPayPic();
}
return "";
}
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.mapper;
import com.cool.store.dto.interview.LineInterviewPageDTO;
import com.cool.store.entity.BankdocDO;
import com.cool.store.request.BranchBankPageRequest;
import com.cool.store.request.LineInterviewPageRequest;
import com.github.pagehelper.Page;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface BankdocMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(BankdocDO record);
Page<BankdocDO> listBranchBank(BranchBankPageRequest request);
}

View File

@@ -0,0 +1,43 @@
package com.cool.store.mapper;
import com.cool.store.entity.BanktypeDO;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface BanktypeMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(BanktypeDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
BanktypeDO selectByPrimaryKey(String pkBanktype);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(BanktypeDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(String pkBanktype);
List<BanktypeDO> listBank();
}

View File

@@ -0,0 +1,42 @@
package com.cool.store.mapper;
import com.cool.store.entity.LinePayDO;
import org.apache.ibatis.annotations.Param;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface LinePayMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(LinePayDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
LinePayDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(LinePayDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
LinePayDO getLinePayByLineId(@Param("lineId") Long lineId);
}

View File

@@ -0,0 +1,50 @@
package com.cool.store.mapper;
import com.cool.store.entity.RegionAreaConfigDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface RegionAreaConfigMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(RegionAreaConfigDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
RegionAreaConfigDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(RegionAreaConfigDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
void deleteRegionAreaConfigByRegionId(@Param("regionId") Long regionId);
void batchInsertOrUpdateRegionAreaConfig(@Param("regionAreaConfigList") List<RegionAreaConfigDO> regionAreaConfigList);
List<RegionAreaConfigDO> listAreaByRegionId(@Param("regionId") Long regionId);
Long getByWantShopAreaId(@Param("wantShopAreaId") Long wantShopAreaId);
}

View File

@@ -0,0 +1,43 @@
package com.cool.store.mapper;
import com.cool.store.entity.RegionQrcodeConfigDO;
import org.apache.ibatis.annotations.Param;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface RegionQrcodeConfigMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(RegionQrcodeConfigDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
RegionQrcodeConfigDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(RegionQrcodeConfigDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
RegionQrcodeConfigDO getByRegionId( @Param("regionId") Long regionId);
}

View File

@@ -0,0 +1,88 @@
<?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.BankdocMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.BankdocDO">
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="combinenum" jdbcType="VARCHAR" property="combinenum" />
<result column="enablestate" jdbcType="DECIMAL" property="enablestate" />
<result column="iscustbank" jdbcType="CHAR" property="iscustbank" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="pk_banktype" jdbcType="VARCHAR" property="pkBanktype" />
</resultMap>
<insert id="insertSelective" parameterType="com.cool.store.entity.BankdocDO">
insert into xfsg_bankdoc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="combinenum != null">
combinenum,
</if>
<if test="enablestate != null">
enablestate,
</if>
<if test="iscustbank != null">
iscustbank,
</if>
<if test="name != null">
name,
</if>
<if test="pkBanktype != null">
pk_banktype,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="combinenum != null">
#{combinenum,jdbcType=VARCHAR},
</if>
<if test="enablestate != null">
#{enablestate,jdbcType=DECIMAL},
</if>
<if test="iscustbank != null">
#{iscustbank,jdbcType=CHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pkBanktype != null">
#{pkBanktype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != code">
and t.code = #{code,jdbcType=VARCHAR}
</if>
<if test="null != combinenum">
and t.combinenum = #{combinenum,jdbcType=VARCHAR}
</if>
<if test="null != enablestate">
and t.enablestate = #{enablestate,jdbcType=DECIMAL}
</if>
<if test="null != iscustbank">
and t.iscustbank = #{iscustbank,jdbcType=CHAR}
</if>
<if test="null != name">
and t.name = #{name,jdbcType=VARCHAR}
</if>
<if test="null != pkBanktype">
and t.pk_banktype = #{pkBanktype,jdbcType=VARCHAR}
</if>
</trim>
</sql>
<select id="listBranchBank" resultMap="BaseResultMap">
SELECT doc.* FROM xfsg_banktype type left join xfsg_bankdoc doc on doc.enablestate = 2 and doc.iscustbank = 'N'
and doc.pk_banktype = type.pk_banktype and type.code = #{bankCode}
<if test="keyword != null and keyword != ''">
and (doc.code like concat('%',#{keyword},'%') or doc.name like concat('%',#{keyword},'%'))
</if>
where doc.code is not null and doc.name is not null
order by doc.name
</select>
</mapper>

View File

@@ -0,0 +1,92 @@
<?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.BanktypeMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.BanktypeDO">
<id column="pk_banktype" jdbcType="CHAR" property="pkBanktype" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="combinecode" jdbcType="VARCHAR" property="combinecode" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Base_Column_List">
pk_banktype, code, combinecode, name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_banktype
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from xfsg_banktype
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.BanktypeDO">
insert into xfsg_banktype
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pkBanktype != null">
pk_banktype,
</if>
<if test="code != null">
code,
</if>
<if test="combinecode != null">
combinecode,
</if>
<if test="name != null">
name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pkBanktype != null">
#{pkBanktype,jdbcType=CHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="combinecode != null">
#{combinecode,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.BanktypeDO">
update xfsg_banktype
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="combinecode != null">
combinecode = #{combinecode,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
</set>
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != pkBanktype">
and t.pk_banktype = #{pkBanktype,jdbcType=CHAR}
</if>
<if test="null != code">
and t.code = #{code,jdbcType=VARCHAR}
</if>
<if test="null != combinecode">
and t.combinecode = #{combinecode,jdbcType=VARCHAR}
</if>
<if test="null != name">
and t.name = #{name,jdbcType=VARCHAR}
</if>
</trim>
</sql>
<select id="listBank" resultMap="BaseResultMap">
select * from xfsg_banktype
where 1=1 and code is not null and name is not null
order by name
</select>
</mapper>

View File

@@ -0,0 +1,283 @@
<?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.LinePayMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.LinePayDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="pay_status" jdbcType="TINYINT" property="payStatus" />
<result column="pay_type" jdbcType="TINYINT" property="payType" />
<result column="pay_user_name" jdbcType="VARCHAR" property="payUserName" />
<result column="pay_account" jdbcType="VARCHAR" property="payAccount" />
<result column="bank_code" jdbcType="VARCHAR" property="bankCode" />
<result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="branch_bank_code" jdbcType="VARCHAR" property="branchBankCode" />
<result column="branch_bank_name" jdbcType="VARCHAR" property="branchBankName" />
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
<result column="pay_pic" jdbcType="VARCHAR" property="payPic" />
<result column="promise_pic" jdbcType="VARCHAR" property="promisePic" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_line_pay
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_line_pay
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.LinePayDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_line_pay
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
partner_id,
</if>
<if test="lineId != null">
line_id,
</if>
<if test="payStatus != null">
pay_status,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="payUserName != null">
pay_user_name,
</if>
<if test="payAccount != null">
pay_account,
</if>
<if test="bankCode != null">
bank_code,
</if>
<if test="bankName != null">
bank_name,
</if>
<if test="branchBankCode != null">
branch_bank_code,
</if>
<if test="branchBankName != null">
branch_bank_name,
</if>
<if test="payTime != null">
pay_time,
</if>
<if test="payPic != null">
pay_pic,
</if>
<if test="promisePic != null">
promise_pic,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
#{partnerId,jdbcType=VARCHAR},
</if>
<if test="lineId != null">
#{lineId,jdbcType=BIGINT},
</if>
<if test="payStatus != null">
#{payStatus,jdbcType=TINYINT},
</if>
<if test="payType != null">
#{payType,jdbcType=TINYINT},
</if>
<if test="payUserName != null">
#{payUserName,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
#{payAccount,jdbcType=VARCHAR},
</if>
<if test="bankCode != null">
#{bankCode,jdbcType=VARCHAR},
</if>
<if test="bankName != null">
#{bankName,jdbcType=VARCHAR},
</if>
<if test="branchBankCode != null">
#{branchBankCode,jdbcType=VARCHAR},
</if>
<if test="branchBankName != null">
#{branchBankName,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
#{payTime,jdbcType=TIMESTAMP},
</if>
<if test="payPic != null">
#{payPic,jdbcType=VARCHAR},
</if>
<if test="promisePic != null">
#{promisePic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
update xfsg_line_pay
<set>
<if test="partnerId != null">
partner_id = #{partnerId,jdbcType=VARCHAR},
</if>
<if test="lineId != null">
line_id = #{lineId,jdbcType=BIGINT},
</if>
<if test="payStatus != null">
pay_status = #{payStatus,jdbcType=TINYINT},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=TINYINT},
</if>
<if test="payUserName != null">
pay_user_name = #{payUserName,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
pay_account = #{payAccount,jdbcType=VARCHAR},
</if>
<if test="bankCode != null">
bank_code = #{bankCode,jdbcType=VARCHAR},
</if>
<if test="bankName != null">
bank_name = #{bankName,jdbcType=VARCHAR},
</if>
<if test="branchBankCode != null">
branch_bank_code = #{branchBankCode,jdbcType=VARCHAR},
</if>
<if test="branchBankName != null">
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
pay_time = #{payTime,jdbcType=TIMESTAMP},
</if>
<if test="payPic != null">
pay_pic = #{payPic,jdbcType=VARCHAR},
</if>
<if test="promisePic != null">
promise_pic = #{promisePic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != partnerId">
and t.partner_id = #{partnerId,jdbcType=VARCHAR}
</if>
<if test="null != lineId">
and t.line_id = #{lineId,jdbcType=BIGINT}
</if>
<if test="null != payStatus">
and t.pay_status = #{payStatus,jdbcType=TINYINT}
</if>
<if test="null != payType">
and t.pay_type = #{payType,jdbcType=TINYINT}
</if>
<if test="null != payUserName">
and t.pay_user_name = #{payUserName,jdbcType=VARCHAR}
</if>
<if test="null != payAccount">
and t.pay_account = #{payAccount,jdbcType=VARCHAR}
</if>
<if test="null != bankCode">
and t.bank_code = #{bankCode,jdbcType=VARCHAR}
</if>
<if test="null != bankName">
and t.bank_name = #{bankName,jdbcType=VARCHAR}
</if>
<if test="null != branchBankCode">
and t.branch_bank_code = #{branchBankCode,jdbcType=VARCHAR}
</if>
<if test="null != branchBankName">
and t.branch_bank_name = #{branchBankName,jdbcType=VARCHAR}
</if>
<if test="null != payTime">
and t.pay_time = #{payTime,jdbcType=TIMESTAMP}
</if>
<if test="null != payPic">
and t.pay_pic = #{payPic,jdbcType=VARCHAR}
</if>
<if test="null != promisePic">
and t.promise_pic = #{promisePic,jdbcType=VARCHAR}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<select id="getLinePayByLineId" resultMap="BaseResultMap">
select * from xfsg_line_pay where line_id = #{lineId} and deleted = '0'
</select>
</mapper>

View File

@@ -0,0 +1,179 @@
<?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.RegionAreaConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.RegionAreaConfigDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="region_id" jdbcType="BIGINT" property="regionId" />
<result column="want_shop_area_id" jdbcType="BIGINT" property="wantShopAreaId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, region_id, want_shop_area_id, create_time, update_time, create_user_id, update_user_id,
deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_area_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_region_area_config
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.RegionAreaConfigDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_region_area_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="regionId != null">
region_id,
</if>
<if test="wantShopAreaId != null">
want_shop_area_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="regionId != null">
#{regionId,jdbcType=BIGINT},
</if>
<if test="wantShopAreaId != null">
#{wantShopAreaId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.RegionAreaConfigDO">
update xfsg_region_area_config
<set>
<if test="regionId != null">
region_id = #{regionId,jdbcType=BIGINT},
</if>
<if test="wantShopAreaId != null">
want_shop_area_id = #{wantShopAreaId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != regionId">
and t.region_id = #{regionId,jdbcType=BIGINT}
</if>
<if test="null != wantShopAreaId">
and t.want_shop_area_id = #{wantShopAreaId,jdbcType=BIGINT}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<delete id="deleteRegionAreaConfigByRegionId">
delete from xfsg_region_area_config
where region_id = #{regionId}
</delete>
<insert id="batchInsertOrUpdateRegionAreaConfig">
insert into xfsg_region_area_config
(
region_id,
want_shop_area_id,
create_time,
create_user_id,
update_time,
update_user_id
)
values
<foreach collection="regionAreaConfigList" item="entity" separator=",">
(
#{entity.regionId},
#{entity.wantShopAreaId},
now(),
#{entity.createUserId},
now(),
#{entity.updateUserId}
)
</foreach>
ON DUPLICATE KEY UPDATE
update_time = now()
</insert>
<select id="listAreaByRegionId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_area_config
where region_id = #{regionId}
</select>
<select id="getByWantShopAreaId" resultType="java.lang.Long">
select region_id
from xfsg_region_area_config
where want_shop_area_id = #{wantShopAreaId}
</select>
</mapper>

View File

@@ -0,0 +1,156 @@
<?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.RegionQrcodeConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.RegionQrcodeConfigDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="region_id" jdbcType="BIGINT" property="regionId" />
<result column="region_name" jdbcType="VARCHAR" property="regionName" />
<result column="pay_pic" jdbcType="VARCHAR" property="payPic" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, region_id, region_name, pay_pic, create_time, update_time, create_user_id, update_user_id,
deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_qrcode_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_region_qrcode_config
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.RegionQrcodeConfigDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_region_qrcode_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="regionId != null">
region_id,
</if>
<if test="regionName != null">
region_name,
</if>
<if test="payPic != null">
pay_pic,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="regionId != null">
#{regionId,jdbcType=BIGINT},
</if>
<if test="regionName != null">
#{regionName,jdbcType=VARCHAR},
</if>
<if test="payPic != null">
#{payPic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.RegionQrcodeConfigDO">
update xfsg_region_qrcode_config
<set>
<if test="regionId != null">
region_id = #{regionId,jdbcType=BIGINT},
</if>
<if test="regionName != null">
region_name = #{regionName,jdbcType=VARCHAR},
</if>
<if test="payPic != null">
pay_pic = #{payPic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != regionId">
and t.region_id = #{regionId,jdbcType=BIGINT}
</if>
<if test="null != regionName">
and t.region_name = #{regionName,jdbcType=VARCHAR}
</if>
<if test="null != payPic">
and t.pay_pic = #{payPic,jdbcType=VARCHAR}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<select id="getByRegionId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_qrcode_config
where region_id = #{regionId}
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author wxp
* @date 2024-03-27 09:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BankdocDO implements Serializable {
@ApiModelProperty("")
private String code;
@ApiModelProperty("")
private String combinenum;
@ApiModelProperty("")
private BigDecimal enablestate;
@ApiModelProperty("")
private String iscustbank;
@ApiModelProperty("")
private String name;
@ApiModelProperty("")
private String pkBanktype;
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author wxp
* @date 2024-03-27 09:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BanktypeDO implements Serializable {
@ApiModelProperty("")
private String pkBanktype;
@ApiModelProperty("")
private String code;
@ApiModelProperty("")
private String combinecode;
@ApiModelProperty("")
private String name;
}

View File

@@ -124,7 +124,7 @@ public class LineInfoDO {
* 是否是加盟商0.否 1.是
*/
@Column(name = "join_status")
private Boolean joinStatus;
private Integer joinStatus;
/**
* 0.公海 1.私海 2黑名单

View File

@@ -0,0 +1,77 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author wxp
* @date 2024-03-27 09:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LinePayDO implements Serializable {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("xfsg_user_info.partner_id")
private String partnerId;
@ApiModelProperty("line_info.id")
private Long lineId;
@ApiModelProperty("支付状态 0:待付款 1:已付款")
private Integer payStatus;
@ApiModelProperty("支付方式 1微信 2银行转账")
private Integer payType;
@ApiModelProperty("付款人姓名")
private String payUserName;
@ApiModelProperty("付款账号")
private String payAccount;
@ApiModelProperty("开户行code")
private String bankCode;
@ApiModelProperty("开户行名称")
private String bankName;
@ApiModelProperty("支行code")
private String branchBankCode;
@ApiModelProperty("支行名称")
private String branchBankName;
@ApiModelProperty("缴纳时间")
private Date payTime;
@ApiModelProperty("付款截图")
private String payPic;
@ApiModelProperty("承诺书图片")
private String promisePic;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人")
private String createUserId;
@ApiModelProperty("更新人")
private String updateUserId;
@ApiModelProperty("是否删除0.否 1.是")
private Boolean deleted;
}

View File

@@ -0,0 +1,44 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author wxp
* @date 2024-03-27 09:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RegionAreaConfigDO implements Serializable {
@ApiModelProperty("主键")
private Long id;
@ApiModelProperty("区域ID 战区id")
private Long regionId;
@ApiModelProperty("意向开店区域 省市code")
private Long wantShopAreaId;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人")
private String createUserId;
@ApiModelProperty("更新人")
private String updateUserId;
@ApiModelProperty("是否删除0.否 1.是")
private Boolean deleted;
}

View File

@@ -0,0 +1,47 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author wxp
* @date 2024-03-27 09:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RegionQrcodeConfigDO implements Serializable {
@ApiModelProperty("主键")
private Long id;
@ApiModelProperty("区域ID 大区id")
private Long regionId;
@ApiModelProperty("大区名称")
private String regionName;
@ApiModelProperty("支付二维码图片url")
private String payPic;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人")
private String createUserId;
@ApiModelProperty("更新人")
private String updateUserId;
@ApiModelProperty("是否删除0.否 1.是")
private Boolean deleted;
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/5/31 11:19
* @Version 1.0
*/
@Data
@ApiModel
public class AddTagsRequest {
@ApiModelProperty("加盟申请线索ID")
private Long lineId;
@ApiModelProperty("标签列表")
private List<Long> tags;
}

View File

@@ -0,0 +1,24 @@
package com.cool.store.request;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author wxp
* @FileName: BranchBankPageRequest
* @Description:支行列表
* @date 2024-03-28 15:51
*/
@Data
public class BranchBankPageRequest extends PageBasicInfo {
@ApiModelProperty("银行code")
@NotNull(message = "银行code不能为空")
private String bankCode;
@ApiModelProperty("支行名字或code")
private String keyword;
}

View File

@@ -0,0 +1,55 @@
package com.cool.store.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@ApiModel("缴纳意向金Request")
public class LinePaySubmitRequest {
@ApiModelProperty("xfsg_user_info.partner_id")
private String partnerId;
@ApiModelProperty("line_info.id")
@NotNull(message = "线索id不能为空")
private Long lineId;
@ApiModelProperty("支付状态 0:待付款 1:已付款")
private Integer payStatus;
@ApiModelProperty("支付方式 1微信 2银行转账")
private Integer payType;
@ApiModelProperty("付款人姓名")
private String payUserName;
@ApiModelProperty("付款账号")
private String payAccount;
@ApiModelProperty("开户行code")
private String bankCode;
@ApiModelProperty("开户行名称")
private String bankName;
@ApiModelProperty("支行code")
private String branchBankCode;
@ApiModelProperty("支行名称")
private String branchBankName;
@ApiModelProperty("缴纳时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date payTime;
@ApiModelProperty("付款截图")
private String payPic;
@ApiModelProperty("承诺书图片")
private String promisePic;
}

View File

@@ -0,0 +1,27 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author wxp
*/
@ApiModel(value = "区域配置")
@Data
public class RegionAreaConfigAddRequest {
@ApiModelProperty("区域id")
@NotNull(message = "区域id不能为空")
private Long regionId;
@ApiModelProperty("省市集合")
@NotEmpty(message = "省市不能为空")
private List<Long> areaIdList;
}

View File

@@ -8,6 +8,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;
/**
* @Author suzhuhong
@@ -28,8 +29,18 @@ public class LineInfoVO {
private String partnerId;
@Column(name = "region_id")
@ApiModelProperty("战区Id")
private Long regionId;
@ApiModelProperty("战区名称")
private String regionName;
@ApiModelProperty("大区ID")
private Long largeRegionId;
@ApiModelProperty("大区ID名称")
private String largeRegionName;
/**
* 手机号
*/
@@ -54,6 +65,8 @@ public class LineInfoVO {
@Column(name = "want_shop_area_id")
@ApiModelProperty("意向开店区域")
private Long wantShopAreaId;
@ApiModelProperty("意向开店区域名称")
private String wantShopAreaName;
/**
* 居住地址
@@ -111,13 +124,21 @@ public class LineInfoVO {
@ApiModelProperty("线索来源")
private Integer lineSource;
@ApiModelProperty("线索来源")
private String lineSourceName;
/**
* 招商经理
*/
@Column(name = "investment_manager")
@ApiModelProperty("招商经理")
private String investmentManager;
@ApiModelProperty("招商经理名称")
private String investmentManagerName;
@ApiModelProperty("招商经理手机号")
private String investmentManagerMobile;
/**
* 拓展经理
*/
@@ -144,14 +165,14 @@ public class LineInfoVO {
*/
@Column(name = "user_portrait")
@ApiModelProperty("用户画像")
private String userPortrait;
private List<LabelBaseInfoVO> userPortraitList;
/**
* 是否是加盟商0.否 1.是
*/
@Column(name = "join_status")
@ApiModelProperty("0-线索 1-蓄水池 2-加盟商")
private Boolean joinStatus;
private Integer joinStatus;
/**
* 0.公海 1.私海 2黑名单

View File

@@ -0,0 +1,70 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author wxp
* @Date 2024/3/25 13:46
* @Version 1.0
*/
@Data
public class LinePayVO {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("xfsg_user_info.partner_id")
private String partnerId;
@ApiModelProperty("line_info.id")
private Long lineId;
@ApiModelProperty("支付状态 0:待付款 1:已付款")
private Byte payStatus;
@ApiModelProperty("支付方式 1微信 2银行转账")
private Byte payType;
@ApiModelProperty("付款人姓名")
private String payUserName;
@ApiModelProperty("付款账号")
private String payAccount;
@ApiModelProperty("开户行code")
private String bankCode;
@ApiModelProperty("开户行名称")
private String bankName;
@ApiModelProperty("支行code")
private String branchBankCode;
@ApiModelProperty("支行名称")
private String branchBankName;
@ApiModelProperty("缴纳时间")
private Date payTime;
@ApiModelProperty("付款截图")
private String payPic;
@ApiModelProperty("承诺书图片")
private String promisePic;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人")
private String createUserId;
@ApiModelProperty("更新人")
private String updateUserId;
}

View File

@@ -39,7 +39,7 @@ public class PartnerBaseInfoVO {
@ApiModelProperty("教育程度 1小学 2初中 3高中 4大学及以上")
private Integer educationLevel;
@ApiModelProperty("家庭年收入 110-20万 220-30万 330-50万 450万以上")
private String annualIncome;
private Integer annualIncome;
@ApiModelProperty("是否有合伙人 1是 0")
private Integer hasPartner;
@ApiModelProperty("资金来源 1自有资金 2合伙资金 3借贷")
@@ -51,9 +51,9 @@ public class PartnerBaseInfoVO {
@ApiModelProperty("是否有水果行业经营的经验 1无 2单店经验 3多店经验 4多店连锁经验")
private Integer fruitIndustryExperience;
@ApiModelProperty("店铺情况 1:自有店铺 2自有意向店铺 3无意向店铺" )
private String storeCondition;
private Integer storeCondition;
@ApiModelProperty("预期回本的最长周期 11年半以上 21年半内 31年内 4半年内")
private String paybackPeriod;
private Integer paybackPeriod;
@ApiModelProperty("是否严格遵守管理标准 1是 2")
private Integer followsManagementStandard;
@ApiModelProperty("是否能参加认证培训 1是 2")
@@ -78,14 +78,14 @@ public class PartnerBaseInfoVO {
partnerBaseInfoVO.setAuditId(memberQuestionDO.getAuditId());
partnerBaseInfoVO.setCareerStatus(memberQuestionDO.getCareerStatus());
partnerBaseInfoVO.setEducationLevel(memberQuestionDO.getEducationLevel());
partnerBaseInfoVO.setAnnualIncome(memberQuestionDO.getAnnualIncome());
partnerBaseInfoVO.setAnnualIncome(Integer.valueOf(memberQuestionDO.getAnnualIncome()));
partnerBaseInfoVO.setHasPartner(memberQuestionDO.getHasPartner());
partnerBaseInfoVO.setCapitalSource(memberQuestionDO.getCapitalSource());
partnerBaseInfoVO.setBusinessMode(memberQuestionDO.getBusinessMode());
partnerBaseInfoVO.setJoinExperience(memberQuestionDO.getJoinExperience());
partnerBaseInfoVO.setFruitIndustryExperience(memberQuestionDO.getFruitIndustryExperience());
partnerBaseInfoVO.setStoreCondition(memberQuestionDO.getStoreCondition());
partnerBaseInfoVO.setPaybackPeriod(memberQuestionDO.getPaybackPeriod());
partnerBaseInfoVO.setStoreCondition(Integer.valueOf(memberQuestionDO.getStoreCondition()));
partnerBaseInfoVO.setPaybackPeriod(Integer.valueOf(memberQuestionDO.getPaybackPeriod()));
partnerBaseInfoVO.setFollowsManagementStandard(memberQuestionDO.getFollowsManagementStandard());
partnerBaseInfoVO.setCanTraining(memberQuestionDO.getCanTraining());
partnerBaseInfoVO.setJoinType(memberQuestionDO.getJoinType());

View File

@@ -1,12 +1,8 @@
package com.cool.store.vo;
import com.cool.store.enums.LineStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
/**
* @Author suzhuhong
@@ -29,33 +25,21 @@ public class PartnerUserInfoVO {
@ApiModelProperty("申请人姓名")
private String username;
@ApiModelProperty("常驻区域")
private String liveArea;
@ApiModelProperty("居住地址")
private String liveAddress;
@ApiModelProperty("意向开店区域ID")
private String wantShopArea;
private Long wantShopAreaId;
@ApiModelProperty("意向开店区域名称")
private String wantShopAreaName;
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
private Integer acceptAdjustType;
@ApiModelProperty("邀请码")
private String inviteCode;
@ApiModelProperty("是否填写加盟需知")
private Integer isWritePartnerKnow;
@ApiModelProperty("openid")
private String openid;
@ApiModelProperty("unionid")
private String unionId;
@ApiModelProperty("是否需要提交意向信息")
private Boolean needSubmitWantInfo;
@ApiModelProperty("线索id")
private Long lineId;
@@ -71,20 +55,8 @@ public class PartnerUserInfoVO {
@ApiModelProperty("0.公海 1.私海 2黑名单")
private Integer lineStatus;
public Boolean getNeedSubmitWantInfo() {
//如果是私海 且liveArea与acceptAdjustType是空 说明通过会销进入 返回false
if (LineStatusEnum.PRIVATE_SEAS.getCode().equals(lineStatus)&&StringUtils.isBlank(liveArea)
&& Objects.isNull(acceptAdjustType)){
return false;
}
if((StringUtils.isBlank(username)
|| StringUtils.isBlank(mobile)
|| StringUtils.isBlank(liveArea)
|| StringUtils.isBlank(wantShopArea)
|| Objects.isNull(acceptAdjustType))){
return true;
}
return false;
}
@ApiModelProperty("线索来源")
private Integer lineSource;
}

View File

@@ -0,0 +1,34 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author byd
* @ClassName RegionDO
* @Description 区域
*/
@ApiModel("区域全路径返回实体")
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RegionPathNameVO implements Serializable {
/**
* 区域全路径名称
*/
@ApiModelProperty("区域全路径名称")
private String allRegionName;
private List<String> regionNameList;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,46 @@
package com.cool.store.vo.oss;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhangchenbiao
* @FileName: OssUploadConfigVO
* @Description: oss 上传config
* @date 2023-06-01 13:46
*/
@Data
public class OssUploadConfigVO {
@ApiModelProperty("域名")
private String accessKeyId;
@ApiModelProperty("策略 Base64编过")
private String policy;
@ApiModelProperty("对Policy签名后的字符串")
private String signature;
@ApiModelProperty("上传目录")
private String dir;
@ApiModelProperty("域名")
private String host;
@ApiModelProperty("上传策略Policy失效时间")
private String expire;
@ApiModelProperty("cdn地址")
private String cdnUrl;
public OssUploadConfigVO(String accessKeyId, String policy, String signature, String dir, String host, String expire, String cdnUrl) {
this.accessKeyId = accessKeyId;
this.policy = policy;
this.signature = signature;
this.dir = dir;
this.host = host;
this.expire = expire;
this.cdnUrl = cdnUrl;
}
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.service;
import com.cool.store.entity.BankdocDO;
import com.cool.store.entity.BanktypeDO;
import com.cool.store.request.BranchBankPageRequest;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* @author Fun Li 2023/8/10 14:23
* @version 1.0
*/
public interface BankService {
List<BanktypeDO> listBank();
PageInfo<BankdocDO> listBranchBank(BranchBankPageRequest request);
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.service;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO;
/**
* @Author wxp
* @Date 2024/3/25 13:45
* @Version 1.0
*/
public interface LinePayService {
LinePayVO getLinePayInfo(Long lineId);
Long submitPayInfo(LinePaySubmitRequest followLog, PartnerUserInfoVO partnerUser);
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.LineListRequest;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineListVO;
@@ -31,4 +32,12 @@ public interface LineService {
PageInfo<LineListVO> getLineList(LineListRequest lineListRequest, LoginUserInfo loginUserInfo,Boolean teamFlag);
/**
* 添加标签
* @param userInfo
* @param addTagsRequest
* @return
*/
Boolean addTags(LoginUserInfo userInfo, AddTagsRequest addTagsRequest);
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.service;
import com.cool.store.vo.oss.OssUploadConfigVO;
import org.springframework.web.multipart.MultipartFile;
/**
* @Author suzhuhong
* @Date 2024/3/28 14:27
* @Version 1.0
*/
public interface OSSService {
/**
* 上传文件
* @return
*/
OssUploadConfigVO getUploadFileConfig();
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.RegionAreaConfigAddRequest;
import java.util.List;
/**
* @Author wxp
* @Date 2022/12/29 11:18
* @Version 1.0
*/
public interface RegionAreaConfigService {
Boolean saveOrUpdateRegionAreaConfig(RegionAreaConfigAddRequest regionAreaConfigAddRequest, LoginUserInfo user);
List<Long> listAreaIdByRegionId(Long regionId);
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.service;
import com.cool.store.vo.RegionPathNameVO;
public interface RegionService {
RegionPathNameVO getAllRegionName(Long regionId);
/**
* 根据意向区域找大区id
* @param wantShopAreaId
* @return
*/
Long getBigRegionIdByAreaId(Long wantShopAreaId);
}

View File

@@ -0,0 +1,45 @@
package com.cool.store.service.impl;
import com.cool.store.dao.BankDAO;
import com.cool.store.entity.BankdocDO;
import com.cool.store.entity.BanktypeDO;
import com.cool.store.request.BranchBankPageRequest;
import com.cool.store.service.BankService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author wxp
* @version 1.0
*/
@Service
@Slf4j
public class BankServiceImpl implements BankService {
@Autowired
private BankDAO bankDAO;
@Override
public List<BanktypeDO> listBank() {
List<BanktypeDO> bankList = bankDAO.listBank();
if (CollectionUtils.isEmpty(bankList)) {
log.info("银行类型为空");
return Lists.newArrayList();
}
return bankList;
}
@Override
public PageInfo<BankdocDO> listBranchBank(BranchBankPageRequest request) {
Page<BankdocDO> pageInfo = bankDAO.listBranchBank(request);
PageInfo resultPage = new PageInfo(pageInfo);
return resultPage;
}
}

View File

@@ -1,14 +1,12 @@
package com.cool.store.service.impl;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.MemberQuestionDO;
import com.cool.store.entity.PartnerBaseInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.mapper.JoinIntentionMapper;
@@ -39,7 +37,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
JoinIntentionMapper joinIntentionMapper;
@Resource
LineInfoMapper lineInfoMapper;
LineInfoDAO lineInfoDAO;
@Resource
HyOpenAreaInfoMapper openAreaInfoMapper;
@@ -60,7 +58,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
}
//todo 目前写死为进入私海
lineInfoParam.setLineStatus(1);
lineInfoMapper.insertOrUpdate(lineInfoParam);
lineInfoDAO.insertOrUpdate(lineInfoParam);
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
memberQuestionDO.setLineId(lineInfoParam.getId());
@@ -78,24 +76,31 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
Integer nextStageInitStatus = nextStage.getInitStatus().getCode();
return null;
lineInfo.setWorkflowSubStage(nextStage.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10.getCode());
lineInfoDAO.updateLineInfo(lineInfo);
return Boolean.TRUE;
}
@Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
return null;
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
lineInfoDAO.updateLineInfo(lineInfo);
return Boolean.TRUE;
}
@Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) {
return null;
lineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
lineInfoDAO.updateLineInfo(lineInfo);
return Boolean.TRUE;
}
@Override
public PartnerBaseInfoVO getByLineId(Long lineId) {
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
LineInfoDO byLineId = lineInfoMapper.getByLineId(lineId);
LineInfoDO byLineId = lineInfoDAO.getLineInfo(lineId);
if (Objects.isNull(result)) {
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
}

View File

@@ -0,0 +1,98 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LinePayDAO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.LinePayDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.service.LinePayService;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.Objects;
/**
* @Author wxp
* @Date 2024/3/28 13:48
* @Version 1.0
*/
@Service
public class LinePayServiceImpl implements LinePayService {
@Resource
private LinePayDAO linePayDAO;
@Resource
private LineInfoDAO lineInfoDAO;
@Resource
LineInfoMapper lineInfoMapper;
@Override
public LinePayVO getLinePayInfo(Long lineId) {
LinePayVO result = new LinePayVO();
LinePayDO linePayDO = linePayDAO.getLinePayByLineId(lineId);
if (linePayDO != null){
BeanUtil.copyProperties(linePayDO,result);
}
return result;
}
@Override
@Transactional(rollbackFor = Exception.class)
public Long submitPayInfo(LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
LinePayDO linePayDO = linePayDAO.getLinePayByLineId(request.getLineId());
if(linePayDO == null){
linePayDO = new LinePayDO();
fillLinePay(true, linePayDO, request, partnerUser);
linePayDAO.addLinePay(linePayDO);
}else {
fillLinePay(false, linePayDO, request, partnerUser);
linePayDAO.updateLinePay(linePayDO);
}
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60.getCode());
lineInfoMapper.insertOrUpdate(lineInfo);
return linePayDO.getId();
}
private void fillLinePay(Boolean isAdd, LinePayDO linePayDO, LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
linePayDO.setPayType(request.getPayType());
linePayDO.setPayUserName(request.getPayUserName());
linePayDO.setPayAccount(request.getPayAccount());
linePayDO.setBankCode(request.getBankCode());
linePayDO.setBankName(request.getBankName());
linePayDO.setBranchBankCode(request.getBranchBankCode());
linePayDO.setBranchBankName(request.getBranchBankName());
linePayDO.setPayTime(request.getPayTime());
linePayDO.setPayPic(request.getPayPic());
linePayDO.setPromisePic(request.getPromisePic());
if(isAdd){
linePayDO.setPartnerId("123");
// linePayDO.setPartnerId(partnerUser.getPartnerId());
linePayDO.setLineId(request.getLineId());
linePayDO.setCreateTime(new Date());
linePayDO.setCreateUserId(partnerUser.getPartnerId());
linePayDO.setDeleted(false);
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
}else {
linePayDO.setUpdateTime(new Date());
linePayDO.setUpdateUserId(partnerUser.getPartnerId());
}
}
}

View File

@@ -1,32 +1,38 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.cool.store.constants.CommonConstants;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerUserChannelDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.*;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.RegionMapper;
import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.LineListRequest;
import com.cool.store.service.DeskService;
import com.cool.store.service.LineService;
import com.cool.store.service.RegionService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.StringUtil;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.vo.BaseInfoVO;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineListVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -47,6 +53,10 @@ public class LineServiceImpl implements LineService {
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
@Resource
EnterpriseUserDAO enterpriseUserDAO;
@Resource
RegionService regionService;
@Resource
RegionDao regionDao;
@Override
public LineInfoVO getLineInfo(Long lineId) {
@@ -56,6 +66,28 @@ public class LineServiceImpl implements LineService {
if (lineInfo==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if (lineInfo.getLineSource()!=null){
Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(Arrays.asList(lineInfo.getLineSource()));
result.setLineSourceName(channelMapByIds.get(lineInfo.getLineSource()));
}
if (StringUtil.isNotEmpty(lineInfo.getInvestmentManager())){
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
result.setInvestmentManagerName(user.getName());
result.setInvestmentManagerMobile(user.getMobile());
}
if(lineInfo.getRegionId()!=null){
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId());
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId()));
result.setRegionId(lineInfo.getRegionId());
result.setRegionName(regionNameMap.get(lineInfo.getRegionId()));
result.setLargeRegionId(bigRegionIdByAreaId);
result.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
}
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(Arrays.asList(lineInfo));
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(Arrays.asList(lineInfo.getWantShopAreaId()));
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(lineInfo, userPortraitMap, wantShopAreaMap);
result.setWantShopAreaName(baseInfoVO.getWantShopAreaName());
result.setUserPortraitList(baseInfoVO.getUserPortraitList());
BeanUtil.copyProperties(lineInfo,result);
return result;
}
@@ -90,4 +122,18 @@ public class LineServiceImpl implements LineService {
page.setList(result);
return page;
}
@Override
public Boolean addTags(LoginUserInfo user, AddTagsRequest addTagsRequest) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(addTagsRequest.getLineId());
if (lineInfo==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
lineInfoDAO.updateLineInfo(lineInfo);
return Boolean.TRUE;
}
}

View File

@@ -0,0 +1,71 @@
package com.cool.store.service.impl;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
import com.aliyun.oss.model.PolicyConditions;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OSSService;
import com.cool.store.vo.oss.OssUploadConfigVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date;
import java.util.Objects;
/**
* @Author suzhuhong
* @Date 2024/3/28 14:29
* @Version 1.0
*/
@Service
@Slf4j
public class OSSServiceImpl implements OSSService {
@Value("${oss.accessKeyId:null}")
private String accessKeyId;
@Value("${oss.accessKeySecret:null}")
private String accessKeySecret;
@Value("${oss.endpoint:null}")
private String endpoint;
@Value("${oss.bucket:null}")
private String bucket;
@Value("${cdn.url:null}")
private String cdnUrl;
@Value("${oss.file.dir:null}")
private String dir;
@Override
public OssUploadConfigVO getUploadFileConfig() {
// host的格式为 bucketname.endpoint
String host = "https://" + bucket + "." + endpoint;
OSS client = null;
try {
client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
long expireTime = 300;
long expireEndTime = System.currentTimeMillis() + expireTime * 1000;
Date expiration = new Date(expireEndTime);
PolicyConditions policyConds = new PolicyConditions();
policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, 1048576000);
policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir);
String postPolicy = client.generatePostPolicy(expiration, policyConds);
byte[] binaryData = postPolicy.getBytes("utf-8");
String encodedPolicy = BinaryUtil.toBase64String(binaryData);
String signature = client.calculatePostSignature(postPolicy);
OssUploadConfigVO result = new OssUploadConfigVO(accessKeyId, encodedPolicy, signature, dir, host, String.valueOf(expireEndTime / 1000), cdnUrl);
return result;
}catch (Exception e){
log.info("exception", e);
throw new ServiceException(ErrorCodeEnum.GET_INFO_ERROR);
}finally {
if(Objects.nonNull(client)){
client.shutdown();
}
}
}
}

View File

@@ -0,0 +1,63 @@
package com.cool.store.service.impl;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.RegionAreaConfigDao;
import com.cool.store.entity.RegionAreaConfigDO;
import com.cool.store.request.RegionAreaConfigAddRequest;
import com.cool.store.service.RegionAreaConfigService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author wxp
* @Date 2022/12/29 11:18
* @Version 1.0
*/
@Service
@Slf4j
public class RegionAreaConfigServiceImpl implements RegionAreaConfigService {
@Resource
private RegionAreaConfigDao regionAreaConfigDao;
@Override
public Boolean saveOrUpdateRegionAreaConfig(RegionAreaConfigAddRequest regionAreaConfigAddRequest, LoginUserInfo user) {
List<Long> areaIdList = regionAreaConfigAddRequest.getAreaIdList();
if(CollectionUtils.isEmpty(areaIdList)){
return Boolean.TRUE;
}
regionAreaConfigDao.deleteRegionAreaConfigByRegionId(regionAreaConfigAddRequest.getRegionId());
List<RegionAreaConfigDO> regionAreaConfigList = new ArrayList<>();
for (Long areaId: areaIdList) {
RegionAreaConfigDO regionAreaConfigDO = new RegionAreaConfigDO();
regionAreaConfigDO.setRegionId(regionAreaConfigAddRequest.getRegionId());
regionAreaConfigDO.setWantShopAreaId(areaId);
regionAreaConfigDO.setCreateUserId(user.getUserId());
regionAreaConfigDO.setUpdateUserId(user.getUserId());
regionAreaConfigList.add(regionAreaConfigDO);
}
if (CollectionUtils.isNotEmpty(regionAreaConfigList)) {
regionAreaConfigDao.batchInsertOrUpdateRegionAreaConfig(regionAreaConfigList);
}
return Boolean.TRUE;
}
@Override
public List<Long> listAreaIdByRegionId(Long regionId) {
List<RegionAreaConfigDO> regionAreaConfigDOList = regionAreaConfigDao.listAreaByRegionId(regionId);
List<Long> areaIdIdList = ListUtils.emptyIfNull(regionAreaConfigDOList)
.stream()
.map(RegionAreaConfigDO::getWantShopAreaId)
.collect(Collectors.toList());
return areaIdIdList;
}
}

View File

@@ -0,0 +1,117 @@
package com.cool.store.service.impl;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.RegionAreaConfigDao;
import com.cool.store.dao.RegionDao;
import com.cool.store.entity.RegionDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.RegionMapper;
import com.cool.store.service.RegionService;
import com.cool.store.utils.RedisConstantUtil;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.RegionPathNameVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* @ClassName RegionServiceImpl
* @Description 区域服务
*/
@Slf4j
@Service
public class RegionServiceImpl implements RegionService {
@Autowired
private RedisConstantUtil redisConstantUtil;
@Resource
private RedisUtilPool redisUtilPool;
@Resource
private RegionMapper regionMapper;
@Resource
private RegionDao regionDao;
@Resource
private RegionAreaConfigDao regionAreaConfigDao;
@Override
public RegionPathNameVO getAllRegionName(Long regionId) {
RegionDO regionDO = regionMapper.getByRegionId(regionId);
if(regionDO == null){
throw new ServiceException(ErrorCodeEnum.REGION_NOT_EXIST);
}
if(regionDO.getDeleted() || StringUtils.isBlank(regionDO.getRegionPath()) || CommonConstants.LONG_ONE.equals(regionDO.getId())){
return RegionPathNameVO.builder().allRegionName(regionDO.getName()).regionNameList(Arrays.asList(regionDO.getName())).build();
}
//若果在缓存中存在,从缓存中去取
String regionNameListStr = redisUtilPool.getString(redisConstantUtil.getRegionNameListKey(String.valueOf(regionId)));
if(StringUtils.isNotBlank(regionNameListStr)){
RegionPathNameVO regionPathNameVO = JSONObject.parseObject(regionNameListStr, RegionPathNameVO.class);
if(regionPathNameVO == null){
regionPathNameVO = new RegionPathNameVO();
}
return regionPathNameVO;
}
String regionPath = regionDO.getRegionPath().substring(1, regionDO.getRegionPath().length() - 1);
String[] regionIdArr = regionPath.split(Constants.FORWARD_SLASH);
List<RegionDO> regionDOList = regionMapper.getRegionByRegionIds(Arrays.asList(regionIdArr));
Map<Long, String> regionNameMap = new HashMap<>();
if(CollectionUtils.isNotEmpty(regionDOList)){
regionNameMap = regionDOList.stream().collect(Collectors.toMap(RegionDO::getId,RegionDO::getName));
}
List<String> regionNameList = new ArrayList<>();
StringBuilder allRegionName = new StringBuilder();
for (String id : regionIdArr){
if(StringUtils.isBlank(id) || !regionNameMap.containsKey(Long.valueOf(id))){
continue;
}
allRegionName.append(regionNameMap.get(Long.valueOf(id))).append(Constants.M_LINE);
regionNameList.add(regionNameMap.get(Long.valueOf(id)));
}
allRegionName.append(regionDO.getName());
regionNameList.add(regionDO.getName());
RegionPathNameVO regionPathNameVO = RegionPathNameVO.builder().allRegionName(allRegionName.toString()).regionNameList(regionNameList).build();
//放在缓存中存5分钟
redisUtilPool.setString(redisConstantUtil.getRegionNameListKey(String.valueOf(regionId)), JSONUtil.toJsonStr(regionPathNameVO), 5 * 60);
return regionPathNameVO;
}
/**
* 根据意向区域找大区id
* @param wantShopAreaId
* @return
*/
@Override
public Long getBigRegionIdByAreaId(Long wantShopAreaId) {
// 根据意向省市获取战区id
Long warRegionId = regionAreaConfigDao.getByWantShopAreaId(wantShopAreaId);
if(Objects.isNull(warRegionId)){
return 0L;
}
RegionDO warRegion = regionMapper.getByRegionId(warRegionId);
if(warRegion == null){
throw new ServiceException(ErrorCodeEnum.REGION_NOT_EXIST);
}
// 根据战区id获取大区id
String warRegionPath = warRegion.getRegionPath().substring(1, warRegion.getRegionPath().length() - 1);
String[] warRegionIdArr = warRegionPath.split(Constants.FORWARD_SLASH);
List<RegionDO> regionDOList = regionMapper.getRegionByRegionIds(Arrays.asList(warRegionIdArr));
for (RegionDO regionDO : regionDOList){
if(regionDO.getRegionType().equals("大区")){
return regionDO.getId();
}
}
return 0L;
}
}

View File

@@ -222,11 +222,13 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
private void fillLineInfo(PartnerUserInfoVO userInfoVO, String partnerId) {
LineInfoDO lineInfoDO = lineInfoDAO.getByPartnerId(partnerId);
if (lineInfoDO != null){
userInfoVO.setUsername(lineInfoDO.getUsername());
userInfoVO.setLineId(lineInfoDO.getId());
userInfoVO.setWorkflowStage(lineInfoDO.getWorkflowStage());
userInfoVO.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
userInfoVO.setWorkflowSubStageStatus(lineInfoDO.getWorkflowSubStageStatus());
userInfoVO.setLineStatus(lineInfoDO.getLineStatus());
userInfoVO.setLineSource(lineInfoDO.getLineSource());
}
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.LineListRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LineService;
@@ -58,6 +59,12 @@ public class LineInfoController {
return ResponseResult.success(lineService.getLineList(lineListRequest,user,Boolean.TRUE));
}
@PostMapping(path = "/addTags")
@ApiOperation("添加标签接口")
public ResponseResult<Boolean> addTags(@RequestBody AddTagsRequest addTagsRequest){
return ResponseResult.success(lineService.addTags(CurrentUserHolder.getUser(),addTagsRequest));
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.controller.webb;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OSSService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2024/3/28 14:25
* @Version 1.0
*/
@Api(tags ="PC OSS配置")
@RestController
@RequestMapping({"/pc/oss"})
@Slf4j
public class OssClientController {
@Resource
OSSService ossService;
@GetMapping("/getUploadFileConfig")
public ResponseResult getUploadFileConfig(){
return ResponseResult.success(ossService.getUploadFileConfig());
}
}

View File

@@ -0,0 +1,41 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.RegionAreaConfigAddRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.RegionAreaConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* @author wxp
* @version 1.0
*/
@Api(tags = "区域配置")
@RestController
@RequestMapping("pc/regionAreaConfig")
public class RegionAreaConfigController {
@Autowired
private RegionAreaConfigService regionAreaConfigService;
@ApiOperation(value = "区域配置省市")
@PostMapping("/addRegionAreaConfig")
public ResponseResult<Boolean> saveOrUpdateRegionAreaConfig(@Valid @RequestBody RegionAreaConfigAddRequest request) {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(regionAreaConfigService.saveOrUpdateRegionAreaConfig(request, user));
}
@ApiOperation("根据战区id获取配置的省市列表")
@GetMapping("/listAreaIdByRegionId")
public ResponseResult<List<Long>> listAreaIdByRegionId(@RequestParam("regionId")Long regionId) {
return ResponseResult.success(regionAreaConfigService.listAreaIdByRegionId(regionId));
}
}

View File

@@ -0,0 +1,46 @@
package com.cool.store.controller.webc;
import com.cool.store.entity.BankdocDO;
import com.cool.store.entity.BanktypeDO;
import com.cool.store.request.BranchBankPageRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.BankService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author Fun Li 2023/8/10 14:20
* @version 1.0
*/
@RestController
@RequestMapping("/mini/bank")
@Api(tags = "银行信息")
@Slf4j
public class BankController {
@Autowired
private BankService bankService;
@ApiOperation("银行类型")
@GetMapping("/listBank")
public ResponseResult<List<BanktypeDO>> listBank() {
List<BanktypeDO> result = bankService.listBank();
return ResponseResult.success(result);
}
@ApiOperation("支行列表查询")
@GetMapping("/listBranchBank")
public ResponseResult<PageInfo<BankdocDO>> listBranchBank(@RequestBody BranchBankPageRequest request) {
return ResponseResult.success(bankService.listBranchBank(request));
}
}

View File

@@ -0,0 +1,48 @@
package com.cool.store.controller.webc;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LinePayService;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author wxp
* @Date 2024/3/25 13:43
* @Version 1.0
*/
@RestController
@RequestMapping("/mini/linePay")
@Api(tags = "缴纳意向金")
@Slf4j
public class LinePayController {
@Resource
private LinePayService linePayService;
@ApiOperation("查询意向金详情")
@GetMapping("/getLinePayInfo")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索id", required = true)
})
public ResponseResult<LinePayVO> getLinePayInfo(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(linePayService.getLinePayInfo(lineId));
}
@ApiOperation("缴纳意向金")
@PostMapping("/submitPayInfo")
public ResponseResult<Long> submitPayInfo(@RequestBody LinePaySubmitRequest request){
PartnerUserInfoVO partnerUser = PartnerUserHolder.getUser();
return ResponseResult.success(linePayService.submitPayInfo(request, partnerUser));
}
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.controller.webc;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OSSService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2024/3/28 14:25
* @Version 1.0
*/
@RestController
@Api(tags ="小程序OSS配置")
@RequestMapping({"/mini/oss"})
@Slf4j
public class MiniOssClientController {
@Resource
OSSService ossService;
@GetMapping("/getUploadFileConfig")
public ResponseResult getUploadFileConfig(){
return ResponseResult.success(ossService.getUploadFileConfig());
}
}

View File

@@ -6,7 +6,9 @@ import com.cool.store.dto.OpenCityDTO;
import com.cool.store.entity.*;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.RegionService;
import com.cool.store.utils.poi.ExcelUtil;
import com.cool.store.vo.RegionPathNameVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -41,6 +43,9 @@ public class TestController {
@Resource
private UserRegionMappingDAO userRegionMappingDAO;
@Resource
private RegionService regionService;
@PostMapping("/importCity")
public ResponseResult<Integer> importCity(MultipartFile file){
@@ -155,4 +160,10 @@ public class TestController {
List<UserRegionMappingDO> userRegionMappingDOList = userRegionMappingDAO.listUserRegionMappingByUserId(userIds);
return ResponseResult.success(userRegionMappingDOList);
}
@GetMapping("/getAllRegionName")
public ResponseResult getAllRegionName(@RequestParam("regionId")Long regionId){
RegionPathNameVO regionPathNameVO = regionService.getAllRegionName(regionId);
return ResponseResult.success(regionPathNameVO);
}
}