Merge branch 'cc_20241008_sysBuildAndAdjust' into 'master'
Cc 20241008 sys build and adjust See merge request hangzhou/java/custom_zxjp!23
This commit is contained in:
@@ -30,6 +30,7 @@ public class CommonConstants {
|
||||
|
||||
public static final int ONE_SECONDS = 1000;
|
||||
|
||||
public static final int MAX_EXPORT_SIZE = 100000;
|
||||
/**
|
||||
* 跟进任务通知缓存时间 1小时
|
||||
*/
|
||||
@@ -189,5 +190,6 @@ public class CommonConstants {
|
||||
|
||||
public static final String HD_ENV = "hd";
|
||||
public static final String ONLINE_ENV = "online";
|
||||
public static final String AMOUNT_KEY = "amount:{0}:{1}";
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ public enum ErrorCodeEnum {
|
||||
PARTNER_MOBILE_INCORRECT(418, "请输入正确的手机号", null),
|
||||
PUBLIC_LINE_NOT_FOLLOW(419, "该线索已存在公海,无跟进人", null),
|
||||
LINE_EXIST_FOLLOW(420, "该线索已存在,跟进人为【{0},{1}】", null),
|
||||
|
||||
INTERNAL_SERVER_ERROR(50000, "服务器异常", null),
|
||||
NO_DATA(50001,"无数据导出",null),
|
||||
ERROR_MESSAGE(421, "{0}", null),
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/24/下午7:37
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum FileTypeEnum {
|
||||
TO_BE_ASSIGNED_LINE("toBeAssignedLine","待分配线索表"),
|
||||
TEAM_LINE("team_line","团队线索表"),
|
||||
TEAM_POINT("team_point","团队铺位管理表"),
|
||||
MY_POINT("my_point","我的铺位管理表"),
|
||||
MY_FRANCHISEES("my_franchisees","我的加盟商"),
|
||||
TEAM_FRANCHISEES("team_franchisees","团队加盟商"),
|
||||
PREPARATION("preparation","进度管理"),
|
||||
;
|
||||
private String fileType;
|
||||
private String desc;
|
||||
private FileTypeEnum(String fileType, String desc) {
|
||||
this.fileType = fileType;
|
||||
this.desc = desc;
|
||||
}
|
||||
public String getFileType() {
|
||||
return fileType;
|
||||
}
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.enums;/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/11/04/下午7:00
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum FranchiseBrandEnum {
|
||||
ZXJP(1,"正新鸡排"),
|
||||
ZXSMZ(2,"正新三明治"),
|
||||
ZJS(3,"正烧记"),
|
||||
DGMX(4,"大鼓米线"),
|
||||
CXM(5,"串小妹"),
|
||||
MZG(6,"茂掌柜");
|
||||
private int code;
|
||||
private String desc;
|
||||
FranchiseBrandEnum(int code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/24/下午7:44
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum ImportStatusEnum {
|
||||
Ongoing(1,"进行中"),
|
||||
success(2,"成功"),
|
||||
fail(3,"失败");
|
||||
private int code;
|
||||
private String msg;
|
||||
ImportStatusEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -121,6 +121,7 @@ public enum ShopSubStageStatusEnum {
|
||||
|
||||
//营帐通开通
|
||||
SHOP_SUB_STAGE_STATUS_240(ShopSubStageEnum.SHOP_STAGE_24, 2400, "待提交", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_244(ShopSubStageEnum.SHOP_STAGE_24, 2440, "无需开通", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_245(ShopSubStageEnum.SHOP_STAGE_24, 2450, "已完成", Boolean.TRUE),
|
||||
|
||||
;
|
||||
|
||||
@@ -123,13 +123,13 @@ public class LineInfoDAO {
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
public List<LineInfoDO> lineList(LineListRequest lineListRequest,String wantShopAreaName, String userId, List<Long> wantShopAreaIds) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,wantShopAreaName,userId,wantShopAreaIds);
|
||||
public List<LineInfoDO> lineList(LineListRequest lineListRequest,String wantShopAreaName, String userId, List<Long> regionIds) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,wantShopAreaName,userId,regionIds);
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
public List<LineInfoDO> partnerList(PartnerRequest partnerRequest,String wantShopAreaName, String userId, List<Long> wantShopAreaIds) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.partnerList(partnerRequest,wantShopAreaName,userId,wantShopAreaIds);
|
||||
public List<LineInfoDO> partnerList(PartnerRequest partnerRequest,String wantShopAreaName, String userId, List<Long> regionIds) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.partnerList(partnerRequest,wantShopAreaName,userId,regionIds);
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
@@ -182,10 +182,10 @@ public class LineInfoDAO {
|
||||
return lineMobile.stream().filter(o->StringUtils.isNotBlank(o.getMobile())).collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile, (k1, k2)-> k1));
|
||||
}
|
||||
|
||||
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager){
|
||||
if(CollectionUtils.isEmpty(lineIds)|| status == null|| StringUtils.isBlank(investmentManager)){
|
||||
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager,Long regionId){
|
||||
if(CollectionUtils.isEmpty(lineIds)|| status == null|| StringUtils.isBlank(investmentManager) || regionId == null){
|
||||
return 0;
|
||||
}
|
||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager);
|
||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
|
||||
import com.cool.store.entity.ImportTaskDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author 邵凌志
|
||||
* @date 2020/12/9 17:58
|
||||
*/
|
||||
@Mapper
|
||||
public interface ImportTaskMapper {
|
||||
|
||||
Integer insert(@Param("eid") String eid, @Param("task") ImportTaskDO task);
|
||||
|
||||
List<ImportTaskDO> getAllImportTask(@Param("eid") String eid, @Param("fileType") String fileType,
|
||||
@Param("userId") String userId, @Param("isImport") Boolean isImport,
|
||||
@Param("status") Integer status);
|
||||
|
||||
Integer update(@Param("eid") String eid, @Param("task")ImportTaskDO task);
|
||||
|
||||
|
||||
ImportTaskDO getImportTaskById(@Param("eid") String eid, @Param("id")Long id);
|
||||
}
|
||||
@@ -18,22 +18,26 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
||||
|
||||
LineInfoDO getByLineId(@Param("lineId") Long lineId);
|
||||
|
||||
List<LineInfoDO> getByLineIds(@Param("lineIds") List<Long> lineIds);
|
||||
|
||||
/**
|
||||
* 查询招商经理待处理数据
|
||||
*
|
||||
* @param investmentManagerUserId
|
||||
* @return
|
||||
*/
|
||||
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("codes") List<Integer> codes);
|
||||
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("codes") List<Integer> codes);
|
||||
|
||||
/**
|
||||
* 面试官待处理
|
||||
*
|
||||
* @param interviewId
|
||||
* @param interviewType
|
||||
* @param codes
|
||||
* @return
|
||||
*/
|
||||
List<LineInfoDO> listByInterview(@Param("interviewId") String interviewId,
|
||||
List<LineInfoDO> listByInterview(@Param("interviewId") String interviewId,
|
||||
@Param("interviewType") Integer interviewType,
|
||||
@Param("pendingInterviewStatusList") List<Integer> pendingInterviewStatusList,
|
||||
@Param("notPassingTheInterview") Integer notPassingTheInterview,
|
||||
@@ -41,22 +45,24 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
|
||||
/**
|
||||
* 我的线索列表
|
||||
*
|
||||
* @param lineListRequest
|
||||
* @return
|
||||
*/
|
||||
List<LineInfoDO> lineList(@Param("request") LineListRequest lineListRequest,
|
||||
@Param("wantShopAreaName") String wantShopAreaName,
|
||||
@Param("userId") String userId,
|
||||
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
|
||||
@Param("regionIds") List<Long> regionIds);
|
||||
|
||||
List<LineInfoDO> partnerList(@Param("request") PartnerRequest partnerRequest,
|
||||
@Param("wantShopAreaName") String wantShopAreaName,
|
||||
@Param("userId") String userId,
|
||||
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
|
||||
@Param("regionIds") List<Long> regionIds);
|
||||
|
||||
|
||||
/**
|
||||
* 公海线索列表
|
||||
* 公海线索列表
|
||||
*
|
||||
* @param publicLineListRequest
|
||||
* @return
|
||||
*/
|
||||
@@ -64,6 +70,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
|
||||
/**
|
||||
* 根据lineId判断是更新还是插入
|
||||
*
|
||||
* @param lineInfoParam
|
||||
*/
|
||||
void insertOrUpdate(@Param("param") LineInfoDO lineInfoParam);
|
||||
@@ -73,6 +80,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
|
||||
/**
|
||||
* 待处理数据
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -81,11 +89,11 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
InvestmentCountDTO investmentData(@Param("userId") String userId);
|
||||
|
||||
|
||||
|
||||
Integer batchUpdateInterviewWorkflowStage(@Param("lineIds") List<Long> lineIds, @Param("workflowSubStage")Integer workflowSubStage, @Param("workflowSubStageStatus")Integer workflowSubStageStatus);
|
||||
Integer batchUpdateInterviewWorkflowStage(@Param("lineIds") List<Long> lineIds, @Param("workflowSubStage") Integer workflowSubStage, @Param("workflowSubStageStatus") Integer workflowSubStageStatus);
|
||||
|
||||
/**
|
||||
* 选址人员获取蓄水池状态的加盟商
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@@ -100,6 +108,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
|
||||
/**
|
||||
* 获取线索手机号
|
||||
*
|
||||
* @param lineIds
|
||||
* @return
|
||||
*/
|
||||
@@ -107,6 +116,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
|
||||
/**
|
||||
* 批量更新招商经理与线索状态
|
||||
*
|
||||
* @param lineIds
|
||||
* @param status
|
||||
* @param investmentManager
|
||||
@@ -114,5 +124,5 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
*/
|
||||
Integer batchUpdateInvestmentManager(@Param("lineIds") List<Long> lineIds,
|
||||
@Param("status") Integer status,
|
||||
@Param("investmentManager") String investmentManager);
|
||||
@Param("investmentManager") String investmentManager, @Param("regionId") Long regionId);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.ImportTaskMapper">
|
||||
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="task.id" >
|
||||
insert into import_task_${eid}
|
||||
(file_name, file_type, is_import, status, file_url, create_user_id, create_name, create_time, remark)
|
||||
values
|
||||
(
|
||||
#{task.fileName},
|
||||
#{task.fileType},
|
||||
#{task.isImport},
|
||||
#{task.status},
|
||||
#{task.fileUrl},
|
||||
#{task.createUserId},
|
||||
#{task.createName},
|
||||
#{task.createTime},
|
||||
#{task.remark}
|
||||
)
|
||||
</insert>
|
||||
<update id="update">
|
||||
update import_task_${eid}
|
||||
set status = #{task.status}
|
||||
<if test="task.fileUrl != null and task.fileUrl != '' ">
|
||||
, file_url = #{task.fileUrl}
|
||||
</if>
|
||||
<if test="task.remark != null and task.remark != '' ">
|
||||
, remark = #{task.remark}
|
||||
</if>
|
||||
<if test="task.successNum != null ">
|
||||
, success_num = #{task.successNum}
|
||||
</if>
|
||||
<if test="task.totalNum != null ">
|
||||
, total_num = #{task.totalNum}
|
||||
</if>
|
||||
<if test="task.fileName != null and task.fileName != '' ">
|
||||
, file_name = #{task.fileName}
|
||||
</if>
|
||||
where id = #{task.id}
|
||||
</update>
|
||||
<select id="getAllImportTask" resultType="com.cool.store.entity.ImportTaskDO">
|
||||
select
|
||||
id,
|
||||
file_name as fileName,
|
||||
status,
|
||||
file_type as fileType,
|
||||
is_import as isImport,
|
||||
file_url as fileUrl,
|
||||
create_name as createName,
|
||||
create_time as createTime,
|
||||
remark,
|
||||
success_num as successNum,
|
||||
total_num as totalNum
|
||||
from import_task_${eid}
|
||||
where create_user_id = #{userId}
|
||||
<if test="fileType != null and fileType != '' ">
|
||||
and file_type = #{fileType}
|
||||
</if>
|
||||
<if test="isImport != null">
|
||||
and is_import = #{isImport}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getImportTaskById" resultType="com.cool.store.entity.ImportTaskDO">
|
||||
select
|
||||
id,
|
||||
file_name as fileName,
|
||||
status,
|
||||
file_type as fileType,
|
||||
is_import as isImport,
|
||||
file_url as fileUrl,
|
||||
create_name as createName,
|
||||
create_time as createTime,
|
||||
remark,
|
||||
success_num as successNum,
|
||||
total_num as totalNum
|
||||
from import_task_${eid}
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -32,6 +32,7 @@
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
||||
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
||||
<result column="franchise_brand" jdbcType="VARCHAR" property="franchiseBrand" />
|
||||
</resultMap>
|
||||
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO xfsg_line_info
|
||||
@@ -437,9 +438,14 @@
|
||||
<if test="request.investmentManagerUserId != null and request.investmentManagerUserId != ''">
|
||||
and a.investment_manager = #{request.investmentManagerUserId}
|
||||
</if>
|
||||
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
|
||||
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and a.want_shop_area_id in (" close=")" separator=",">
|
||||
#{wantShopAreaId}
|
||||
<if test="request.regionIds !=null and request.regionIds.size>0">
|
||||
<foreach collection="request.regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="regionIds !=null and regionIds.size>0">
|
||||
<foreach collection="regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by a.id desc
|
||||
@@ -472,9 +478,14 @@
|
||||
and a.development_manager = #{request.queryUserId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
|
||||
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and a.want_shop_area_id in (" close=")" separator=",">
|
||||
#{wantShopAreaId}
|
||||
<if test="request.regionIds !=null and request.regionIds.size>0">
|
||||
<foreach collection="request.regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="regionIds !=null and regionIds.size>0">
|
||||
<foreach collection="regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by a.id desc
|
||||
@@ -533,7 +544,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLines" resultType="com.cool.store.dto.openPreparation.PlanLineDTO">
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username,xli.investment_manager as investmentManagerId ,eu.name as name
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username,xli.investment_manager as investmentManagerId ,eu.name as investmentManagerName
|
||||
from xfsg_line_info xli
|
||||
join enterprise_user_${enterpriseId} eu on xli.investment_manager = eu.user_id
|
||||
where deleted = 0
|
||||
@@ -571,7 +582,7 @@
|
||||
|
||||
|
||||
<update id="batchUpdateInvestmentManager">
|
||||
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} where id in
|
||||
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} ,region_id = #{regionId} where id in
|
||||
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
||||
<result property="poi" column="poi" jdbcType="VARCHAR"/>
|
||||
<result property="storeId" column="store_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
@@ -35,6 +37,6 @@
|
||||
settler_bank_name,
|
||||
account,store_positioning_url,authorization_url,
|
||||
create_time,update_time,create_user,
|
||||
update_user
|
||||
update_user,poi,store_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/31/下午4:16
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AmountDTO {
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.ContentStyle;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/4/26 15:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT,wrapped = true)
|
||||
public class PreparationScheduleDTO {
|
||||
|
||||
@ExcelProperty("加盟商名称")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("加盟商名称")
|
||||
private String username;
|
||||
|
||||
@ExcelProperty("加盟商手机号")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("加盟手机号")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("门店名称")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ExcelProperty("门店编号")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeNum;
|
||||
|
||||
|
||||
@ExcelProperty("当前进度")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("当前进度")
|
||||
private String currentProgress;
|
||||
|
||||
@ExcelProperty("计划开店时间")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("计划开店时间")
|
||||
private String planOpenTime;
|
||||
|
||||
@ExcelProperty("开店时长(小时)")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("开店时长")
|
||||
private String days;
|
||||
|
||||
@ExcelProperty("所属区域")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("所属站区")
|
||||
private String regionNodeName;
|
||||
|
||||
@ExcelProperty("招商经理")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("招商经理名称")
|
||||
private String investmentManagerName;
|
||||
|
||||
@ExcelProperty("督导")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("督导")
|
||||
private String supervisionName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author 邵凌志
|
||||
* @date 2020/12/9 16:00
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ImportTaskDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 文件类型:region-区域,store-门店,user-人员
|
||||
*/
|
||||
private String fileType;
|
||||
|
||||
/**
|
||||
* 是否是导入
|
||||
*/
|
||||
private Boolean isImport;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 成功条数
|
||||
*/
|
||||
private Integer successNum;
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
*/
|
||||
private Integer totalNum;
|
||||
|
||||
/**
|
||||
* 上传人员id
|
||||
*/
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 上传人
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
private Long createTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
public ImportTaskDO(String fileName, String fileType, Boolean isImport, Integer status, String createUserId, String createName, Long createTime) {
|
||||
this.fileName = fileName;
|
||||
this.fileType = fileType;
|
||||
this.isImport = isImport;
|
||||
this.status = status;
|
||||
this.createUserId = createUserId;
|
||||
this.createName = createName;
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
@@ -175,5 +175,6 @@ public class LineInfoDO {
|
||||
|
||||
@Column(name = "join_mode")
|
||||
private Integer joinMode;
|
||||
|
||||
@Column(name = "franchise_brand")
|
||||
private String franchiseBrand;
|
||||
}
|
||||
@@ -132,5 +132,15 @@ public class PlatformBuildDO {
|
||||
@Column(name = "update_user")
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
* poi
|
||||
*/
|
||||
@Column(name = "poi")
|
||||
private String poi;
|
||||
/**
|
||||
* 门店ID
|
||||
*/
|
||||
@Column(name = "store_id")
|
||||
private String storeId;
|
||||
|
||||
}
|
||||
@@ -26,4 +26,6 @@ public class AddLineRequest {
|
||||
private Integer joinMode;
|
||||
|
||||
private String investmentManagerUserId;
|
||||
|
||||
private Long regionId;
|
||||
}
|
||||
|
||||
@@ -16,4 +16,6 @@ public class DistributionInvestmentRequest {
|
||||
|
||||
private List<Long> lineIds;
|
||||
|
||||
private Long regionId;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/27 16:32
|
||||
@@ -18,6 +20,8 @@ public class LineListRequest extends PageBasicInfo {
|
||||
private String userName;
|
||||
@ApiModelProperty("线索手机号")
|
||||
private String mobile;
|
||||
@ApiModelProperty("所属区域")
|
||||
private List<String> regionIds;
|
||||
@ApiModelProperty("关键字")
|
||||
private String keyword;
|
||||
@ApiModelProperty("线索子阶段")
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/4/1 11:21
|
||||
@@ -12,7 +14,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PartnerRequest extends PageBasicInfo {
|
||||
|
||||
|
||||
@ApiModelProperty("所属区域")
|
||||
private List<String> regionIds;
|
||||
@ApiModelProperty("加密状态 1-蓄水池 2-正式")
|
||||
private Integer joinStatus;
|
||||
@ApiModelProperty("加盟上姓名或者手机号")
|
||||
|
||||
@@ -42,6 +42,14 @@ public class PlatformBuildAuditRequest {
|
||||
@Length(max = 250, message = "平台密码 长度不能超过250")
|
||||
@ApiModelProperty("平台密码)")
|
||||
private String password;
|
||||
@ApiModelProperty( "poi")
|
||||
@Length(max = 250, message = "poi 长度不能超过250")
|
||||
private String poi;
|
||||
|
||||
@ApiModelProperty( "门店ID")
|
||||
@Length(max = 250, message = "门店ID 长度不能超过250")
|
||||
private String storeId;
|
||||
|
||||
|
||||
public static ShopAuditInfoDO convert(PlatformBuildAuditRequest request, AuditTypeEnum auditType) {
|
||||
ShopAuditInfoDO result = new ShopAuditInfoDO();
|
||||
|
||||
@@ -73,7 +73,6 @@ public class PlatformBuildRequest {
|
||||
private String ksAccount;
|
||||
|
||||
|
||||
|
||||
public PlatformBuildDO toDO() {
|
||||
PlatformBuildDO platformBuildDO = new PlatformBuildDO();
|
||||
platformBuildDO.setShopId(this.shopId);
|
||||
@@ -87,6 +86,7 @@ public class PlatformBuildRequest {
|
||||
platformBuildDO.setSettlerBankName(this.settlerBankName);
|
||||
platformBuildDO.setStorePositioningUrl(this.storePositioningUrl);
|
||||
platformBuildDO.setAuthorizationUrl(this.authorizationUrl);
|
||||
platformBuildDO.setKsAccount(this.ksAccount);
|
||||
return platformBuildDO;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -21,12 +22,15 @@ public class UpdateLineRequest {
|
||||
private String lineName;
|
||||
@ApiModelProperty("加盟意向区域")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty("所属区域")
|
||||
private Long regionId;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("加盟模式 1-社会加盟 2-强加盟")
|
||||
private Integer joinMode;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("加盟品牌")
|
||||
private String franchiseBrand;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,11 @@ public class UpdateShopCodeRequest {
|
||||
@NotNull
|
||||
private Long shopId;
|
||||
|
||||
@NotBlank
|
||||
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,14 @@ public class PlatformBuildResponse {
|
||||
|
||||
@ApiModelProperty("初审原因")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty("小程序美团外卖和饿了吗勇这个:最新审批原因")
|
||||
private String newReason;
|
||||
|
||||
@ApiModelProperty( "poi")
|
||||
private String poi;
|
||||
|
||||
@ApiModelProperty( "门店ID")
|
||||
private String storeId;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class BaseInfoVO {
|
||||
|
||||
@ApiModelProperty("所属区域")
|
||||
private String regionName;
|
||||
@ApiModelProperty("线索ID")
|
||||
private Long lineId;
|
||||
|
||||
|
||||
@@ -228,5 +228,6 @@ public class LineInfoVO {
|
||||
|
||||
private Long bigRegionId;
|
||||
|
||||
private String franchiseBrand;
|
||||
|
||||
}
|
||||
|
||||
@@ -77,5 +77,6 @@ public class LinePayVO {
|
||||
private String updateUserId;
|
||||
@ApiModelProperty("缴费金额")
|
||||
private String amount;
|
||||
|
||||
@ApiModelProperty("阶段状态")
|
||||
private Integer workflowSubStageStatus;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.vo.Preparation;
|
||||
|
||||
import com.cool.store.vo.BaseInfoVO;
|
||||
import com.lowagie.text.alignment.HorizontalAlignment;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@ public class PreparationCommonPendingVO {
|
||||
private String storeName;
|
||||
@ApiModelProperty("门店负责人名称")
|
||||
private String shopManagerUserName;
|
||||
@ApiModelProperty("门店编码")
|
||||
private String shopCode;
|
||||
@ApiModelProperty("店铺地址")
|
||||
private String shopAddress;
|
||||
@ApiModelProperty("督导")
|
||||
private String investmentManager;
|
||||
@ApiModelProperty("加盟商名称")
|
||||
private String partnerName;
|
||||
@ApiModelProperty("手机号")
|
||||
|
||||
@@ -32,11 +32,15 @@ public class MiniShopPageVO {
|
||||
@ApiModelProperty("加盟合同签约完成标识,0-未完成,1-完成")
|
||||
private Boolean flag;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode,Boolean flag) {
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode,Boolean flag,Long pointId) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
this.shopCode = shopCode;
|
||||
this.flag = flag;
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap ) {
|
||||
@@ -49,7 +53,7 @@ public class MiniShopPageVO {
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode(),flag));
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode(),flag,shopInfo.getPointId()));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ public class WechatRest {
|
||||
private String wxAppId;
|
||||
@Value("${weixin.appSecret}")
|
||||
private String wxAppSecret;
|
||||
|
||||
/**
|
||||
* 小程序Token 地址
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.cool.store.oss;
|
||||
|
||||
import com.aliyun.oss.ClientException;
|
||||
import com.aliyun.oss.OSSClient;
|
||||
import com.aliyun.oss.OSSException;
|
||||
import com.aliyun.oss.event.ProgressEvent;
|
||||
import com.aliyun.oss.event.ProgressEventType;
|
||||
import com.aliyun.oss.event.ProgressListener;
|
||||
import com.aliyun.oss.model.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* Created by gavin on 15/8/5.
|
||||
* 阿里云OSS客户端
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class OssClientService {
|
||||
|
||||
@Value("${oss.endpoint}")
|
||||
private String endpoint;
|
||||
@Value("${oss.accessKeyId}")
|
||||
private String accessKeyId;
|
||||
@Value("${oss.accessKeySecret}")
|
||||
private String accessKeySecret;
|
||||
@Value("${oss.bucket}")
|
||||
private String bucketName;
|
||||
|
||||
@Value("${oss.host}")
|
||||
private String ossHost;
|
||||
|
||||
|
||||
private OSSClient client = null;
|
||||
|
||||
private OSSClient getClient() {
|
||||
if(client==null) {
|
||||
synchronized(this){
|
||||
client= new OSSClient(endpoint, accessKeyId, accessKeySecret);
|
||||
}
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
/**OSSClient
|
||||
* 获取上传进度回调
|
||||
*/
|
||||
class PutObjectProgressListener implements ProgressListener {
|
||||
|
||||
private long bytesWritten = 0;
|
||||
private long totalBytes = -1;
|
||||
private boolean succeed = false;
|
||||
|
||||
@Override
|
||||
public void progressChanged(ProgressEvent progressEvent) {
|
||||
long bytes = progressEvent.getBytes();
|
||||
ProgressEventType eventType = progressEvent.getEventType();
|
||||
switch (eventType) {
|
||||
case TRANSFER_STARTED_EVENT:
|
||||
log.info("Start to upload......");
|
||||
break;
|
||||
|
||||
case REQUEST_CONTENT_LENGTH_EVENT:
|
||||
this.totalBytes = bytes;
|
||||
log.info(this.totalBytes + " bytes in total will be uploaded to OSS");
|
||||
break;
|
||||
|
||||
case REQUEST_BYTE_TRANSFER_EVENT:
|
||||
this.bytesWritten += bytes;
|
||||
if (this.totalBytes != -1) {
|
||||
int percent = (int) (this.bytesWritten * 100.0 / this.totalBytes);
|
||||
log.info(bytes + " bytes have been written at this time, upload progress: " +
|
||||
percent + "%(" + this.bytesWritten + "/" + this.totalBytes + ")");
|
||||
} else {
|
||||
log.info(bytes + " bytes have been written at this time, upload ratio: unknown" +
|
||||
"(" + this.bytesWritten + "/...)");
|
||||
}
|
||||
break;
|
||||
|
||||
case TRANSFER_COMPLETED_EVENT:
|
||||
this.succeed = true;
|
||||
log.info("Succeed to upload, " + this.bytesWritten + " bytes have been transferred in total");
|
||||
break;
|
||||
|
||||
case TRANSFER_FAILED_EVENT:
|
||||
log.info("Failed to upload, " + this.bytesWritten + " bytes have been transferred");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSucceed() {
|
||||
return succeed;
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectMetadata getObject(String key) {
|
||||
OSSClient ossClient = getClient();
|
||||
ObjectMetadata metadata = ossClient.getObjectMetadata(bucketName, key);
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public InputStream getFileContent(String key) {
|
||||
OSSClient ossClient = getClient();
|
||||
InputStream content = ossClient.getObject(bucketName, key).getObjectContent();
|
||||
return content;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void downloadFile(String key, String filePath, String tempFilePath) {
|
||||
|
||||
OSSClient ossClient = getClient();
|
||||
DownloadFileRequest downloadFileRequest = new DownloadFileRequest(bucketName, key);
|
||||
downloadFileRequest.setDownloadFile(filePath);
|
||||
downloadFileRequest.setPartSize(1 * 1024 * 1024L);
|
||||
downloadFileRequest.setTaskNum(10);
|
||||
downloadFileRequest.setEnableCheckpoint(true);
|
||||
downloadFileRequest.setCheckpointFile(tempFilePath);
|
||||
try {
|
||||
DownloadFileResult downloadRes = ossClient.downloadFile(downloadFileRequest);
|
||||
downloadRes.getObjectMetadata();
|
||||
} catch (Throwable throwable) {
|
||||
log.error("downloadFile error", throwable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到阿里云OSS
|
||||
*
|
||||
* @param fileName
|
||||
* @param inputStream
|
||||
* @param contentLength
|
||||
* @param contentType
|
||||
* @throws Exception
|
||||
*/
|
||||
@Async("taskExecutor")
|
||||
public void putObjectAsync(String fileName, InputStream inputStream, Long contentLength, String contentType) throws Exception {
|
||||
putObject(fileName, inputStream, contentLength, contentType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到阿里云OSS
|
||||
*
|
||||
* @param fileName
|
||||
* @param inputStream
|
||||
* @param contentLength
|
||||
* @param contentType
|
||||
* @throws Exception
|
||||
*/
|
||||
public String putObject(String fileName, InputStream inputStream, Long contentLength, String contentType) throws Exception {
|
||||
|
||||
OSSClient ossClient = getClient();
|
||||
|
||||
try {
|
||||
ObjectMetadata meta = new ObjectMetadata();
|
||||
meta.setContentLength(contentLength);
|
||||
|
||||
meta.setContentType(contentType);
|
||||
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, fileName, inputStream, meta);
|
||||
log.info("uploadBaseImage, send...");
|
||||
PutObjectResult p = ossClient.putObject(putObjectRequest.withProgressListener(new PutObjectProgressListener()));
|
||||
String url = "https://"+bucketName+"."+endpoint +"/"+ fileName;
|
||||
log.info("uploadBaseImage, send over,url:{}", url);
|
||||
return url;
|
||||
|
||||
// return p.getETag();
|
||||
|
||||
} catch (OSSException oe) {
|
||||
log.warn("oss出现问题", oe);
|
||||
log.error("Caught an OSSException, which means your request made it to OSS, " + "but was rejected with an error response for some reason.");
|
||||
log.error("Error Message: " + oe.getErrorCode());
|
||||
log.error("Error Code: " + oe.getErrorCode());
|
||||
log.error("Request ID: " + oe.getRequestId());
|
||||
log.error("Host ID: " + oe.getHostId());
|
||||
throw oe;
|
||||
} catch (ClientException ce) {
|
||||
log.warn("oss客户端出现问题", ce);
|
||||
log.error("Caught an ClientException, which means the client encountered "
|
||||
+ "a serious internal problem while trying to communicate with OSS, "
|
||||
+ "such as not being able to access the network.");
|
||||
log.error("Error Message: " + ce.getMessage());
|
||||
throw ce;
|
||||
}catch (Exception e){
|
||||
log.warn("uploadBaseImage, error");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到阿里云OSS
|
||||
*
|
||||
* @param fileName
|
||||
* @param inputStream
|
||||
*/
|
||||
public String putObject(String fileName, InputStream inputStream) {
|
||||
|
||||
OSSClient ossClient = getClient();
|
||||
|
||||
try {
|
||||
log.info("uploadBaseImage, send...");
|
||||
PutObjectResult p = ossClient.putObject(bucketName, fileName, inputStream);
|
||||
log.info("uploadBaseImage, send over");
|
||||
String url = ossHost + fileName;
|
||||
return url;
|
||||
// return p.getETag();
|
||||
} catch (OSSException oe) {
|
||||
log.warn("oss出现问题", oe);
|
||||
log.error("Caught an OSSException, which means your request made it to OSS, " + "but was rejected with an error response for some reason.");
|
||||
log.error("Error Message: " + oe.getErrorCode());
|
||||
log.error("Error Code: " + oe.getErrorCode());
|
||||
log.error("Request ID: " + oe.getRequestId());
|
||||
log.error("Host ID: " + oe.getHostId());
|
||||
throw oe;
|
||||
} catch (ClientException ce) {
|
||||
log.warn("oss客户端出现问题", ce);
|
||||
log.error("Caught an ClientException, which means the client encountered "
|
||||
+ "a serious internal problem while trying to communicate with OSS, "
|
||||
+ "such as not being able to access the network.");
|
||||
log.error("Error Message: " + ce.getMessage());
|
||||
throw ce;
|
||||
}catch (Exception e){
|
||||
log.warn("uploadBaseImage, error");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.entity.ImportTaskDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/29/下午1:57
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface ExportRealizeService {
|
||||
|
||||
void preparationList( List<PreparationDTO> preparationDTOS,ImportTaskDO importTaskDO);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.*;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/24/下午4:57
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface ExportService {
|
||||
Integer preparationList(PreparationRequest request,LoginUserInfo loginUserInfo);
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public interface FranchiseFeeService {
|
||||
*/
|
||||
Boolean submitLicense(FranchiseFeeRequest request);
|
||||
|
||||
Boolean update(FranchiseFeeRequest request);
|
||||
/**
|
||||
* 查询加盟费信息
|
||||
* @param shopId
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.AmountDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.vo.LinePayVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
@@ -15,6 +16,8 @@ public interface LinePayService {
|
||||
|
||||
LinePayVO getLinePayInfo(Long lineId,Integer businessType,Long shopId);
|
||||
|
||||
Boolean setAmount(Long lineId, String amount);
|
||||
String getAmount(Long lineId);
|
||||
/**
|
||||
* 跳过缴纳意向金
|
||||
* @param lineId
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface PosAndOrderInfoService {
|
||||
|
||||
Integer submitOrUpdate(PostAndOrderRequest request ,String user);
|
||||
|
||||
|
||||
PosAndOrderResponse get(Long shopId, Integer type);
|
||||
|
||||
Boolean skip(Long shopId, Integer type);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
@@ -79,6 +80,8 @@ public class DeskServiceImpl implements DeskService {
|
||||
private DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Autowired
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Autowired
|
||||
private PointInfoDAO pointInfoDAO;
|
||||
|
||||
@Override
|
||||
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId) {
|
||||
@@ -481,7 +484,10 @@ public class DeskServiceImpl implements DeskService {
|
||||
//将lines 转为map
|
||||
Map<Long, PlanLineDTO> lineMap = lines.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, line -> line));
|
||||
|
||||
List<Long> pointId = shopInfoList.stream().filter(x -> Objects.nonNull(x.getPointId())).map(ShopInfoDO::getPointId).collect(Collectors.toList());
|
||||
|
||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
||||
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||
List<Long> regionIds = shopInfoList.stream().map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||
@@ -538,10 +544,19 @@ public class DeskServiceImpl implements DeskService {
|
||||
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
||||
preparationCommonPendingVO.setLineId(x.getLineId());
|
||||
preparationCommonPendingVO.setShopId(x.getShopId());
|
||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||
if (shopInfoDO != null) {
|
||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||
if(pointInfoDO != null) {
|
||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
||||
}
|
||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||
}
|
||||
preparationCommonPendingVO.setInvestmentManager(lineMap.getOrDefault(x.getLineId(),new PlanLineDTO()).getInvestmentManagerName());
|
||||
preparationCommonPendingVO.setStage(x.getShopStage());
|
||||
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
||||
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||
|
||||
if (ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
||||
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, finalShopPayDoMap.getOrDefault(x.getShopId(), new LinePayDO()).getCreateTime()));
|
||||
}
|
||||
@@ -616,7 +631,10 @@ public class DeskServiceImpl implements DeskService {
|
||||
List<Long> lineIds = shopInfoList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
|
||||
List<PlanLineDTO> lines = lineInfoDAO.getLines(lineIds);
|
||||
|
||||
List<Long> pointId = shopInfoList.stream().filter(x -> Objects.nonNull(x.getPointId())).map(ShopInfoDO::getPointId).collect(Collectors.toList());
|
||||
|
||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
||||
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||
//将shopInfoList 转为map
|
||||
Map<Long, ShopInfoDO> shopInfoMap = shopInfoList.stream().collect(Collectors.toMap(ShopInfoDO::getId, shop -> shop));
|
||||
//将lines 转为map
|
||||
@@ -631,6 +649,13 @@ public class DeskServiceImpl implements DeskService {
|
||||
operationLogDOList.forEach(x -> {
|
||||
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||
if (shopInfoDO != null) {
|
||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||
if(pointInfoDO != null) {
|
||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
||||
}
|
||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||
}
|
||||
preparationCommonPendingVO.setLineId(shopInfoDO.getLineId());
|
||||
preparationCommonPendingVO.setShopId(x.getShopId());
|
||||
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.dto.PreparationScheduleDTO;
|
||||
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.ImportTaskMapper;
|
||||
import com.cool.store.mapper.IntentAgreementMapper;
|
||||
import com.cool.store.mapper.PointInfoMapper;
|
||||
import com.cool.store.request.InitiatingRequest;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
||||
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD_HH_MM_SS;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/29/下午1:58
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
@Resource
|
||||
private PointInfoMapper pointInfoMapper;
|
||||
@Resource
|
||||
private ImportTaskMapper importTaskMapper;
|
||||
@Autowired
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Autowired
|
||||
private HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
SysRoleService sysRoleService;
|
||||
@Resource
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||
@Resource
|
||||
DeskService deskService;
|
||||
@Resource
|
||||
private EasyExcelUtil easyExcelUtil;
|
||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||
private String eid;
|
||||
@Resource
|
||||
private IntentAgreementMapper intentAgreementMapper;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Autowired
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private QualificationsInfoDAO qualificationsInfoDAO;
|
||||
@Resource
|
||||
private LinePayDAO linePayDAO;
|
||||
@Resource
|
||||
RedisUtilPool redisUtilPool;
|
||||
|
||||
@Autowired
|
||||
private RegionDao regionDao;
|
||||
|
||||
@Async
|
||||
@Override
|
||||
public void preparationList(List<PreparationDTO> preparationDTOS, ImportTaskDO importTaskDO) {
|
||||
Boolean flag = Boolean.TRUE;
|
||||
String url = "";
|
||||
try {
|
||||
List<Long> shopIds = preparationDTOS.stream().map(PreparationDTO::getId).collect(Collectors.toList());
|
||||
List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds);
|
||||
List<ShopStageInfoDO> shopContractActualCompletionTime = shopStageInfoDAO.getShopContractActualCompletionTime(shopIds);
|
||||
Map<Long, ScheduleDTO> scheduleDTOMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x));
|
||||
Map<Long, ShopStageInfoDO> shopStageInfoDOMap = shopContractActualCompletionTime.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, x -> x));
|
||||
List<Long> regionIds = preparationDTOS.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
Set<String> userIds = preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getShopManagerUserId())).map(PreparationDTO::getShopManagerUserId).collect(Collectors.toSet());
|
||||
userIds.addAll(preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getInvestmentManager())).map(PreparationDTO::getInvestmentManager).collect(Collectors.toSet()));
|
||||
userIds.addAll(preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getSupervisorUserId())).map(PreparationDTO::getSupervisorUserId).collect(Collectors.toSet()));
|
||||
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(new ArrayList<>(userIds));
|
||||
|
||||
List<PreparationScheduleDTO> result = new ArrayList<>();
|
||||
preparationDTOS.forEach(x -> {
|
||||
PreparationScheduleDTO dto1 = new PreparationScheduleDTO();
|
||||
dto1.setMobile(x.getMobile());
|
||||
dto1.setUsername(x.getUsername());
|
||||
dto1.setShopName(x.getShopName());
|
||||
dto1.setPlanOpenTime(DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, x.getPlanOpenTime()));
|
||||
dto1.setStoreNum(x.getStoreNum());
|
||||
dto1.setSupervisionName(userInfoMap.getOrDefault(x.getSupervisorUserId(), new EnterpriseUserDO()).getName());
|
||||
dto1.setInvestmentManagerName(userInfoMap.getOrDefault(x.getInvestmentManager(), new EnterpriseUserDO()).getName());
|
||||
dto1.setRegionNodeName(regionNameMap.getOrDefault(x.getRegionId(), ""));
|
||||
ScheduleDTO dto = scheduleDTOMap.getOrDefault(x.getId(), new ScheduleDTO());
|
||||
dto1.setCurrentProgress(dto.getCompletionColumn().toString()+ "/" + dto.getTotalColumn().toString() );
|
||||
ShopStageInfoDO stageInfoDO = shopStageInfoDOMap.getOrDefault(x.getId(), new ShopStageInfoDO());
|
||||
if (StringUtils.isNotEmpty(stageInfoDO.getActualCompleteTime()) && x.getPlanOpenTime() != null) {
|
||||
long between = ChronoUnit.SECONDS.between(DateUtils.strToDate(stageInfoDO.getActualCompleteTime(), DateUtils.YYYY_MM_DD_HH_MM_SS).toInstant(), x.getPlanOpenTime().toInstant());
|
||||
double days = (double) between / (24 * 60 * 60);
|
||||
String day = String.format("%.1f", days);
|
||||
if (StringUtils.isNotEmpty(day)) {
|
||||
dto1.setDays(day);
|
||||
}
|
||||
}
|
||||
result.add(dto1);
|
||||
});
|
||||
url = easyExcelUtil.exportExcel(PreparationScheduleDTO.class, result, null, FileTypeEnum.PREPARATION.getDesc()+DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1,new Date()), FileTypeEnum.PREPARATION.getDesc()+DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1,new Date()));
|
||||
} catch (Throwable e) {
|
||||
flag = Boolean.FALSE;
|
||||
log.error("fileUpload upload err, originFileName={}", FileTypeEnum.TEAM_LINE.getDesc(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.INTERNAL_SERVER_ERROR);
|
||||
} finally {
|
||||
if (flag) {
|
||||
importTaskDO.setStatus(ImportStatusEnum.success.getCode());
|
||||
importTaskDO.setFileUrl(url);
|
||||
} else {
|
||||
importTaskDO.setStatus(ImportStatusEnum.fail.getCode());
|
||||
}
|
||||
importTaskMapper.update(eid, importTaskDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.FileTypeEnum;
|
||||
import com.cool.store.enums.ImportStatusEnum;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.ImportTaskMapper;
|
||||
import com.cool.store.mapper.PointInfoMapper;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.Preparation.PreparationScheduleVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/24/下午5:03
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
public class ExportServiceImpl implements ExportService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ExportServiceImpl.class);
|
||||
@Resource
|
||||
private ExportRealizeService exportRealizeService;
|
||||
@Resource
|
||||
private PointInfoMapper pointInfoMapper;
|
||||
@Resource
|
||||
private ImportTaskMapper importTaskMapper;
|
||||
@Autowired
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
SysRoleService sysRoleService;
|
||||
@Resource
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||
@Resource
|
||||
private EasyExcelUtil easyExcelUtil;
|
||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||
private String eid;
|
||||
@Autowired
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
|
||||
|
||||
@Override
|
||||
public Integer preparationList(PreparationRequest request,LoginUserInfo loginUserInfo) {
|
||||
if (!sysRoleService.checkIsAdmin(request.getCurUserId())) {
|
||||
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(request.getCurUserId()));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||
request.setRegionIds(null);
|
||||
} else {
|
||||
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||
}
|
||||
}
|
||||
//开业进度数据
|
||||
List<PreparationDTO> preparationDTOS = shopInfoDAO.ListByCondition(request);
|
||||
if (CollectionUtils.isEmpty(preparationDTOS)) {
|
||||
throw new ServiceException(ErrorCodeEnum.NO_DATA);
|
||||
}
|
||||
List<PreparationDTO> result;
|
||||
if (preparationDTOS.size()>CommonConstants.MAX_EXPORT_SIZE){
|
||||
result= preparationDTOS.subList(0,CommonConstants.MAX_EXPORT_SIZE);
|
||||
}else {
|
||||
result=preparationDTOS;
|
||||
}
|
||||
ImportTaskDO importTaskDO = new ImportTaskDO();
|
||||
importTaskDO.setStatus(ImportStatusEnum.Ongoing.getCode());
|
||||
importTaskDO.setFileName(FileTypeEnum.PREPARATION.getDesc()+DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1,new Date()));
|
||||
importTaskDO.setIsImport(Boolean.FALSE);
|
||||
importTaskDO.setFileType(FileTypeEnum.PREPARATION.getFileType());
|
||||
importTaskDO.setCreateUserId(request.getCurUserId());
|
||||
importTaskDO.setCreateTime(new Date().getTime());
|
||||
importTaskDO.setCreateName(loginUserInfo.getName());
|
||||
importTaskMapper.insert(eid, importTaskDO);
|
||||
exportRealizeService.preparationList(result, importTaskDO);
|
||||
return result.size();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -71,6 +71,18 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(FranchiseFeeRequest request) {
|
||||
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
|
||||
FranchiseFeeDO franchiseFeeDO1 = franchiseFeeMapper.selectByShopId(request.getShopId());
|
||||
if (Objects.nonNull(franchiseFeeDO1)) {
|
||||
franchiseFeeDO.setId(franchiseFeeDO1.getId());
|
||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FranchiseFeeResponse getDetail(Long shopId) {
|
||||
FranchiseFeeDO result = franchiseFeeMapper.selectByShopId(shopId);
|
||||
|
||||
@@ -76,26 +76,29 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||
if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
||||
EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
||||
lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||
}
|
||||
lineInfoParam.setLineStatus(1);
|
||||
// if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
||||
// EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
||||
// lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||
// }
|
||||
lineInfoParam.setLineStatus(0);
|
||||
//强加盟 前期不确定意向区域
|
||||
if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
||||
Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||
lineInfoParam.setRegionId(regionId);
|
||||
// if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||
// lineInfoParam.setRegionId(regionId);
|
||||
// }
|
||||
if (StringUtils.isBlank(lineInfoDO.getInvestmentManager())){
|
||||
lineInfoParam.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
}
|
||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||
requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
||||
// Map<String, String> requestMap = new HashMap<>();
|
||||
// requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||
// requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||
// requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
||||
// HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||
// requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
||||
//工作通知后面对接企业微信
|
||||
// commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
||||
// MessageEnum.MESSAGE_29,
|
||||
|
||||
@@ -3,11 +3,13 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.LinePayDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.dto.AmountDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
@@ -22,17 +24,21 @@ import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.service.LinePayService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.cool.store.vo.LinePayVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -44,6 +50,8 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class LinePayServiceImpl implements LinePayService {
|
||||
|
||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||
private String eid;
|
||||
@Resource
|
||||
private LinePayDAO linePayDAO;
|
||||
|
||||
@@ -61,7 +69,8 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
|
||||
@Resource
|
||||
ShopInfoMapper shopInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisUtilPool redisUtilPool;
|
||||
@Override
|
||||
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
|
||||
LinePayVO result = null;
|
||||
@@ -72,9 +81,26 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
result.setPartnerName(lineInfo != null ? lineInfo.getUsername() : "");
|
||||
result.setMobile(lineInfo != null ? lineInfo.getMobile() : "");
|
||||
result.setWorkflowSubStageStatus(lineInfo.getWorkflowSubStageStatus());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public Boolean setAmount(Long lineId, String amount) {
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineId);
|
||||
redisUtilPool.setString(key, amount);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAmount(Long lineId) {
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineId);
|
||||
String getAmount = redisUtilPool.getString(key);
|
||||
if (StringUtils.isNotBlank(getAmount)) {
|
||||
return getAmount;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean skipPay(Long lineId, LoginUserInfo user) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -132,15 +133,17 @@ public class LineServiceImpl implements LineService {
|
||||
|
||||
@Override
|
||||
public PageInfo<LineListVO> getLineList(LineListRequest lineListRequest, LoginUserInfo loginUserInfo,Boolean teamFlag) {
|
||||
List<Long> wantShopAreaIds = new ArrayList<>();
|
||||
List<Long> regionId = new ArrayList<>();
|
||||
String userId = null;
|
||||
if(!teamFlag){
|
||||
userId = loginUserInfo.getUserId();
|
||||
}
|
||||
if (teamFlag && !sysRoleService.checkIsAdmin(loginUserInfo.getUserId())){
|
||||
List<Long> list = userAuthMappingService.listWantShopAreaIdByUserId(loginUserInfo.getUserId());
|
||||
List<String> list = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(loginUserInfo.getUserId());
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
wantShopAreaIds = list;
|
||||
for (String s : list){
|
||||
regionId.add(Long.valueOf(s));
|
||||
}
|
||||
}else {
|
||||
userId = loginUserInfo.getUserId();
|
||||
}
|
||||
@@ -150,8 +153,10 @@ public class LineServiceImpl implements LineService {
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(lineListRequest.getWantShopAreaId());
|
||||
areaName = hyOpenAreaInfoDO.getAreaPath();
|
||||
}
|
||||
List<String> subRegionIdsByRegionIds = regionService.getSubRegionIdsByRegionIds(lineListRequest.getRegionIds());
|
||||
lineListRequest.setRegionIds(subRegionIdsByRegionIds);
|
||||
PageHelper.startPage(lineListRequest.getPageNum(), lineListRequest.getPageSize());
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.lineList(lineListRequest,areaName, userId, wantShopAreaIds);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.lineList(lineListRequest,areaName, userId, regionId);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -161,11 +166,15 @@ public class LineServiceImpl implements LineService {
|
||||
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||
|
||||
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).map(LineInfoDO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||
List<LineListVO> result = new ArrayList<>();
|
||||
lineInfoDOS.forEach(x->{
|
||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||
LineListVO lineListVO = new LineListVO(baseInfoVO);
|
||||
if (regionNameMap!=null){
|
||||
lineListVO.setRegionName(regionNameMap.get(x.getRegionId()));
|
||||
}
|
||||
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
|
||||
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||
lineListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
||||
@@ -192,7 +201,6 @@ public class LineServiceImpl implements LineService {
|
||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getCreateUserId() != null).map(LineInfoDO::getCreateUserId).collect(Collectors.toList()));
|
||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getDevelopmentManager() != null).map(LineInfoDO::getDevelopmentManager).collect(Collectors.toList()));
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||
|
||||
List<PublicLineListVO> result = new ArrayList<>();
|
||||
lineInfoDOS.forEach(x->{
|
||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||
@@ -213,15 +221,17 @@ public class LineServiceImpl implements LineService {
|
||||
@Override
|
||||
public PageInfo<PartnerListVO> getPartnerList(PartnerRequest partnerRequest, LoginUserInfo loginUserInfo, Boolean teamFlag) {
|
||||
|
||||
List<Long> wantShopAreaIds = new ArrayList<>();
|
||||
List<Long> regionId = new ArrayList<>();
|
||||
String userId = null;
|
||||
if(!teamFlag){
|
||||
userId = loginUserInfo.getUserId();
|
||||
}
|
||||
if (teamFlag && !sysRoleService.checkIsAdmin(loginUserInfo.getUserId())){
|
||||
List<Long> list = userAuthMappingService.listWantShopAreaIdByUserId(loginUserInfo.getUserId());
|
||||
List<String> list = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(loginUserInfo.getUserId());
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
wantShopAreaIds = list;
|
||||
for (String s : list){
|
||||
regionId.add(Long.valueOf(s));
|
||||
}
|
||||
}else {
|
||||
userId = loginUserInfo.getUserId();
|
||||
}
|
||||
@@ -231,8 +241,10 @@ public class LineServiceImpl implements LineService {
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(partnerRequest.getWantShopAreaId());
|
||||
areaName = hyOpenAreaInfoDO.getAreaPath();
|
||||
}
|
||||
List<String> subRegionIdsByRegionIds = regionService.getSubRegionIdsByRegionIds(partnerRequest.getRegionIds());
|
||||
partnerRequest.setRegionIds(subRegionIdsByRegionIds);
|
||||
PageHelper.startPage(partnerRequest.getPageNum(), partnerRequest.getPageSize());
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.partnerList(partnerRequest,areaName, userId, wantShopAreaIds);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.partnerList(partnerRequest,areaName, userId, regionId);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -250,6 +262,8 @@ public class LineServiceImpl implements LineService {
|
||||
List<SigningBaseInfoDO> signingBaseInfoDOS = intentAgreementMapper.selectByLineIds(lineIds);
|
||||
Map<Long, Date> dateMap = signingBaseInfoDOS.stream().collect(Collectors.toMap(SigningBaseInfoDO::getLineId, SigningBaseInfoDO::getCreateTime));
|
||||
|
||||
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).map(LineInfoDO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||
List<PartnerListVO> result = new ArrayList<>();
|
||||
lineInfoDOS.forEach(x->{
|
||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||
@@ -258,6 +272,9 @@ public class LineServiceImpl implements LineService {
|
||||
if (date != null){
|
||||
partnerListVO.setJoinTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date));
|
||||
}
|
||||
if (regionNameMap!=null){
|
||||
partnerListVO.setRegionName(regionNameMap.get(x.getRegionId()));
|
||||
}
|
||||
partnerListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||
partnerListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
||||
partnerListVO.setJoinStatus(x.getJoinStatus());
|
||||
@@ -330,9 +347,9 @@ public class LineServiceImpl implements LineService {
|
||||
if (lineInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
lineInfo.setFranchiseBrand(updateLineRequest.getFranchiseBrand());
|
||||
lineInfo.setJoinMode(updateLineRequest.getJoinMode());
|
||||
Long regionId = regionAreaConfigDao.getByWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
||||
lineInfo.setRegionId(regionId);
|
||||
lineInfo.setRegionId(updateLineRequest.getRegionId());
|
||||
lineInfo.setWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
||||
lineInfo.setUsername(updateLineRequest.getLineName());
|
||||
lineInfo.setUpdateTime(new Date());
|
||||
@@ -348,7 +365,7 @@ public class LineServiceImpl implements LineService {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
//批量更新线索
|
||||
lineInfoDAO.batchUpdateInvestmentManager(request.getLineIds(),LineStatusEnum.PRIVATE_SEAS.getCode(), request.getInvestmentManagerId());
|
||||
lineInfoDAO.batchUpdateInvestmentManager(request.getLineIds(),LineStatusEnum.PRIVATE_SEAS.getCode(), request.getInvestmentManagerId(),request.getRegionId());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -436,10 +453,11 @@ public class LineServiceImpl implements LineService {
|
||||
lineInfoDO.setUsername(addLineRequest.getUserName());
|
||||
lineInfoDO.setLineSource(Integer.valueOf(UserChannelEnum.ADD.getCode()));
|
||||
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
if (addLineRequest.getJoinMode()==1){
|
||||
Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId());
|
||||
lineInfoDO.setRegionId(regionId);
|
||||
}
|
||||
// if (addLineRequest.getJoinMode()==1){
|
||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId());
|
||||
// lineInfoDO.setRegionId(regionId);
|
||||
// }
|
||||
lineInfoDO.setRegionId(addLineRequest.getRegionId());
|
||||
lineInfoDO.setInvestmentManager(getInvestmentManagerUserId(addLineRequest, userInfo));
|
||||
lineInfoDO.setCreateUserId(userInfo.getUserId());
|
||||
lineInfoDO.setUpdateUserId(userInfo.getUserId());
|
||||
@@ -461,8 +479,9 @@ public class LineServiceImpl implements LineService {
|
||||
if (CommonConstants.TWO==addLineRequest.getJoinMode()){
|
||||
return userInfo.getUserId();
|
||||
}
|
||||
EnterpriseUserDO user = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, addLineRequest.getWantShopAreaId());
|
||||
return user.getUserId();
|
||||
//zxjp改为直接用regionId
|
||||
// EnterpriseUserDO user = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, addLineRequest.getRegionId());
|
||||
return userInfo.getUserId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class OperationLogServiceImpl implements OperationLogService {
|
||||
calendar.add(Calendar.SECOND, 1);
|
||||
Date date = calendar.getTime();
|
||||
if(CollectionUtils.isEmpty(operationUserList)){
|
||||
operationUserList=new ArrayList<>();
|
||||
operationUserList = new ArrayList<>();
|
||||
operationUserList.addAll(enterpriseUserDAO.getUserInfoByUserIds(enterpriseUserRoleDao.selectUserIdsByRole(Role.MASTER))) ;
|
||||
}
|
||||
for (EnterpriseUserDO operationUser : operationUserList) {
|
||||
|
||||
@@ -426,6 +426,8 @@ private Integer doThing(PlatformBuildDO platformBuildDO, PlatformBuildAuditReque
|
||||
platformBuildDO.setPassword(request.getPassword());
|
||||
platformBuildDO.setUpdateTime(new Date());
|
||||
platformBuildDO.setUpdateUser(request.getOperateUserId());
|
||||
platformBuildDO.setPoi(request.getPoi());
|
||||
platformBuildDO.setStoreId(request.getStoreId());
|
||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuildDO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,8 @@ public class PointServiceImpl implements PointService {
|
||||
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
|
||||
PointDetailInfoDO shopPoint = AddPointDetailRequest.convertDO(shopPointDetailRequest);
|
||||
shopPoint.setPointId(pointId);
|
||||
return pointDetailInfoDAO.addPointDetailInfo(shopPoint);
|
||||
pointDetailInfoDAO.addPointDetailInfo(shopPoint);
|
||||
return pointId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,8 +5,12 @@ import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.PosAndOrderInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.PosAndOrderInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.PosAndOrderEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.PostAndOrderRequest;
|
||||
import com.cool.store.response.PosAndOrderResponse;
|
||||
import com.cool.store.service.PosAndOrderInfoService;
|
||||
@@ -44,15 +48,15 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
||||
if (Objects.isNull(posAndOrderInfoDO)) {
|
||||
if (request.getType().equals(PosAndOrderEnum.POS.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_163);
|
||||
}else if (request.getType().equals(PosAndOrderEnum.ORDER.getCode())) {
|
||||
} else if (request.getType().equals(PosAndOrderEnum.ORDER.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_173);
|
||||
}else if (request.getType().equals(PosAndOrderEnum.XIN_FA_SYS.getCode())) {
|
||||
} else if (request.getType().equals(PosAndOrderEnum.XIN_FA_SYS.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_235);
|
||||
}else if (request.getType().equals(PosAndOrderEnum.TENT_PASS.getCode())) {
|
||||
} else if (request.getType().equals(PosAndOrderEnum.TENT_PASS.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_245);
|
||||
}
|
||||
return posAndOrderInfoDAO.insertSelective(posAndOrderInfo);
|
||||
}else{
|
||||
} else {
|
||||
return posAndOrderInfoDAO.updateByShopIdSelective(posAndOrderInfo);
|
||||
}
|
||||
}
|
||||
@@ -60,7 +64,7 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
||||
@Override
|
||||
public PosAndOrderResponse get(Long shopId, Integer type) {
|
||||
PosAndOrderResponse response = new PosAndOrderResponse();
|
||||
PosAndOrderInfoDO posAndOrderInfoDO = posAndOrderInfoDAO.selectOneByShopId(shopId,type);
|
||||
PosAndOrderInfoDO posAndOrderInfoDO = posAndOrderInfoDAO.selectOneByShopId(shopId, type);
|
||||
if (Objects.nonNull(posAndOrderInfoDO)) {
|
||||
response.setShopId(posAndOrderInfoDO.getShopId());
|
||||
response.setAccount(posAndOrderInfoDO.getAccount());
|
||||
@@ -72,6 +76,16 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean skip(Long shopId, Integer type) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_24);
|
||||
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_244);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -83,6 +83,8 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||
}
|
||||
}
|
||||
List<String> subRegionIdsByRegionIds = regionService.getSubRegionIdsByRegionIds(request.getRegionIds());
|
||||
request.setRegionIds(subRegionIdsByRegionIds);
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
//开业进度数据
|
||||
List<PreparationDTO> preparationDTOS = shopInfoDAO.ListByCondition(request);
|
||||
|
||||
@@ -183,6 +183,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||
}
|
||||
shopInfo.setShopCode(request.getShopCode());
|
||||
shopInfo.setShopName(request.getShopName());
|
||||
shopInfo.setUpdateTime(new Date());
|
||||
return shopInfoDAO.updateShopInfo(shopInfo);
|
||||
}
|
||||
|
||||
@@ -161,27 +161,28 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
if (Objects.isNull(request.getId())) {
|
||||
signFranchiseMapper.insertSelective(signFranchiseDO);
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
//todo 提交之后先直接到已签约 正常是待审核
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||
//如果加盟合同完成 开始设计阶段与验收阶段
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||
} else {
|
||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||
}
|
||||
//店铺信息
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
shopInfoDO.setRegionId(request.getRegionId());
|
||||
shopInfoDO.setShopName(request.getShopName());
|
||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
//todo 提交之后先直接到已签约 正常是待审核
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||
//如果加盟合同完成 开始设计阶段与验收阶段
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||
|
||||
return new ResponseResult(200000,"提交成功");
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
|
||||
@@ -120,12 +120,12 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
EnterpriseUserDO userDO = enterpriseUserDAO.getUserInfoById(suitableUserId);
|
||||
return userDO;
|
||||
}
|
||||
Long warRegionId = regionAreaConfigDao.getByWantShopAreaId(wantShopAreaId);
|
||||
if (warRegionId == null) {
|
||||
return fillDefaultUser(userRoleEnum);
|
||||
}
|
||||
// Long warRegionId = regionAreaConfigDao.getByWantShopAreaId(wantShopAreaId);
|
||||
// if (warRegionId == null) {
|
||||
// return fillDefaultUser(userRoleEnum);
|
||||
// }
|
||||
// 查找有战区权限的人
|
||||
List<String> authWarRegionUserIdList = authWarRegionUser(warRegionId);
|
||||
List<String> authWarRegionUserIdList = authWarRegionUser(wantShopAreaId);
|
||||
if (CollectionUtils.isEmpty(authWarRegionUserIdList)) {
|
||||
return fillDefaultUser(userRoleEnum);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cool.store.utils.easyExcel;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy;
|
||||
import com.cool.store.mapper.ImportTaskMapper;
|
||||
import com.cool.store.oss.OssClientService;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class EasyExcelUtil {
|
||||
|
||||
private static final String EXCEL_SUFFIX = ".xlsx";
|
||||
private static final String CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||
private String eid;
|
||||
@Resource
|
||||
private OssClientService ossClientService;
|
||||
@Resource
|
||||
private ImportTaskMapper importTaskMapper;
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param fileName 保存文件的标题
|
||||
* @param head 保存excel对象的实体类
|
||||
* @param list 需要保存的数据列表
|
||||
* @throws IOException 异常捕获
|
||||
*/
|
||||
public String exportExcel( Class head, List list, Set<String> set, String sheetName, String fileName) throws Exception {
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
if (set == null) {
|
||||
EasyExcel.write(outputStream, head)
|
||||
.autoCloseStream(true)
|
||||
.registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)25))
|
||||
.sheet(sheetName)
|
||||
.doWrite(list);
|
||||
} else {
|
||||
EasyExcel.write(outputStream, head).autoCloseStream(true).includeColumnFiledNames(set).sheet(sheetName)
|
||||
.doWrite(list);
|
||||
}
|
||||
byte[] bytes = outputStream.toByteArray();
|
||||
long size = bytes.length;
|
||||
InputStream is = new ByteArrayInputStream(bytes);
|
||||
if (StringUtils.isNotBlank(fileName) && fileName.contains(".")) {
|
||||
fileName = fileName.substring(0, fileName.lastIndexOf("."));
|
||||
}
|
||||
String file = getUploadPath(eid) + fileName + "_" + UUIDUtils.get32UUID() + EXCEL_SUFFIX;
|
||||
return ossClientService.putObject(file, is, size, CONTENT_TYPE);
|
||||
|
||||
}
|
||||
|
||||
private String getUploadPath(String eid) {
|
||||
String time = DateUtil.format(new Date(), "yyMM");
|
||||
return "eid" + "/" + eid + "/" + time + "/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ExportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/25/上午10:20
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pc/export")
|
||||
@Api("导出")
|
||||
public class ExportController {
|
||||
|
||||
@Resource
|
||||
private ExportService exportService;
|
||||
|
||||
|
||||
@PostMapping("/preparationList")
|
||||
@ApiOperation("进度管理")
|
||||
public ResponseResult preparationList(@RequestBody PreparationRequest request) {
|
||||
request.setCurUserId(CurrentUserHolder.getUserId());
|
||||
return ResponseResult.success(exportService.preparationList(request, CurrentUserHolder.getUser()));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.TransferLogDTO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -19,6 +20,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
|
||||
@@ -29,6 +29,12 @@ public class PCFranchiseFeeController {
|
||||
public ResponseResult submitLicense(@RequestBody FranchiseFeeRequest request) {
|
||||
return ResponseResult.success(franchiseFeeService.submitLicense(request));
|
||||
}
|
||||
@ApiOperation("基本信息修改")
|
||||
@PostMapping("/update")
|
||||
public ResponseResult update(@RequestBody FranchiseFeeRequest request) {
|
||||
return ResponseResult.success(franchiseFeeService.update(request));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("基本信息查询")
|
||||
@GetMapping("/getDetail")
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.AmountDTO;
|
||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
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("/pc/linePay")
|
||||
@Api(tags = "pc缴纳意向金")
|
||||
@Slf4j
|
||||
public class PCLinePayController {
|
||||
|
||||
@Resource
|
||||
private LinePayService linePayService;
|
||||
|
||||
@ApiOperation("保存意向金额")
|
||||
@PostMapping("/setAmount")
|
||||
public ResponseResult<Boolean> setAmount(@RequestParam("lineId")Long lineId,@RequestBody AmountDTO amount) {
|
||||
return ResponseResult.success(linePayService.setAmount( lineId,amount.getAmount().toString()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询意向金额")
|
||||
@GetMapping("/getAmount")
|
||||
public ResponseResult<String> getAmount(@RequestParam("lineId") Long lineId) {
|
||||
return ResponseResult.success(linePayService.getAmount(lineId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class PCShopController {
|
||||
return ResponseResult.success(shopService.addShop(request));
|
||||
}
|
||||
|
||||
@ApiOperation("修改门店编号")
|
||||
@ApiOperation("修改门店编号和门店名称")
|
||||
@PostMapping("/updateShopCode")
|
||||
public ResponseResult<Integer> updateShopCode(@RequestBody @Validated UpdateShopCodeRequest request) {
|
||||
return ResponseResult.success(shopService.updateShopCode(request));
|
||||
|
||||
@@ -49,4 +49,9 @@ public class XinFaSysAndTentPassController {
|
||||
request.setType(PosAndOrderEnum.TENT_PASS.getCode());
|
||||
return ResponseResult.success(posAndOrderInfoService.submitOrUpdate(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
@ApiOperation("营帐通无需提交")
|
||||
@PostMapping("/skipTentPass")
|
||||
private ResponseResult<Boolean> skipTentPass(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(posAndOrderInfoService.skip(shopId, PosAndOrderEnum.TENT_PASS.getCode()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.AmountDTO;
|
||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -23,7 +25,7 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/linePay")
|
||||
@Api(tags = "缴纳意向金")
|
||||
@Api(tags = "mini缴纳意向金")
|
||||
@Slf4j
|
||||
public class LinePayController {
|
||||
|
||||
@@ -46,4 +48,10 @@ public class LinePayController {
|
||||
return ResponseResult.success(linePayService.submitPayInfo(request, partnerUser));
|
||||
}
|
||||
|
||||
@ApiOperation("查询意向金额")
|
||||
@GetMapping("/getAmount")
|
||||
public ResponseResult<String> getAmount(@RequestParam("lineId") Long lineId) {
|
||||
return ResponseResult.success(linePayService.getAmount(lineId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-in
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.host=https://oss-store.coolcollege.cn/
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
@@ -32,6 +32,7 @@ rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX5N7rwl.cn-hangzhou.mq-in
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.host=https://oss-store.coolcollege.cn/
|
||||
oss.accessKeyId=LTAI5tS2khSZfYrTL5cerHbY
|
||||
oss.accessKeySecret=YChLLev5KRZmgHCAkU7odkhGWk1aif
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_69?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_74?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=coolstore
|
||||
default.datasource.password=CSCErYcXniNYm7bT
|
||||
|
||||
@@ -32,6 +32,7 @@ rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:808
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.host=https://oss-store.coolcollege.cn/
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
@@ -32,6 +32,7 @@ rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX5N7rwl.cn-hangzhou.mq-in
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.host=https://oss-store.coolcollege.cn/
|
||||
oss.accessKeyId=LTAI5tS2khSZfYrTL5cerHbY
|
||||
oss.accessKeySecret=YChLLev5KRZmgHCAkU7odkhGWk1aif
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
@@ -32,6 +32,7 @@ rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-in
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.host=https://oss-store.coolcollege.cn/
|
||||
oss.accessKeyId=LTAI5t6Zk3Y3vyrMXC87jGYB
|
||||
oss.accessKeySecret=6Gw06jtW5xNKWqbhnt1KmVZx1z9Dev
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
Reference in New Issue
Block a user