Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -66,7 +66,7 @@ public class CoolDateUtils {
|
|||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
LocalDate thirdDay = today.plusDays(day);
|
LocalDate thirdDay = today.plusDays(day);
|
||||||
LocalDateTime thirdDayMidnight = LocalDateTime.of(thirdDay, LocalTime.MIDNIGHT);
|
LocalDateTime thirdDayMidnight = LocalDateTime.of(thirdDay, LocalTime.MIDNIGHT);
|
||||||
LocalDateTime thirdDay235959 = thirdDayMidnight.with(LocalTime.MAX);
|
LocalDateTime thirdDay235959 = thirdDayMidnight.with(LocalTime.MIN);
|
||||||
ZonedDateTime zonedDateTime = ZonedDateTime.of(thirdDay235959, ZoneId.systemDefault());
|
ZonedDateTime zonedDateTime = ZonedDateTime.of(thirdDay235959, ZoneId.systemDefault());
|
||||||
return Date.from(zonedDateTime.toInstant());
|
return Date.from(zonedDateTime.toInstant());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
||||||
|
import com.cool.store.mapper.HyPartnerTaskInfoLogMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author wxp
|
||||||
|
* @Date 2023/6/25 19:41
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class HyPartnerTaskInfoLogDAO {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HyPartnerTaskInfoLogMapper hyPartnerTaskInfoLogMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int updateByPrimaryKeySelective(HyPartnerTaskInfoLogDO hyPartnerTaskInfoLogDO){
|
||||||
|
return hyPartnerTaskInfoLogMapper.updateByPrimaryKeySelective(hyPartnerTaskInfoLogDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int insertSelective( HyPartnerTaskInfoLogDO record){
|
||||||
|
return hyPartnerTaskInfoLogMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
b.interviewer as interviewer,
|
b.interviewer as interviewer,
|
||||||
b.create_time as createTime,
|
b.create_time as createTime,
|
||||||
b.room_id as roomId
|
b.room_id as roomId
|
||||||
from hy_partner_interview a inner join hy_partner_interview_plan b on a.interview_plan_id = b.id
|
from hy_partner_interview a left join hy_partner_interview_plan b on a.interview_plan_id = b.id
|
||||||
<where>
|
<where>
|
||||||
<if test="userId!=null and userId!=''">
|
<if test="userId!=null and userId!=''">
|
||||||
and a.interviewer = #{userId}
|
and a.interviewer = #{userId}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@
|
|||||||
select
|
select
|
||||||
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
|
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
|
||||||
IFNULL(sum(if(workflow_stage=2 and workflow_status = 1,1,0)),0) as reservationInterviewCount,
|
IFNULL(sum(if(workflow_stage=2 and workflow_status = 1,1,0)),0) as reservationInterviewCount,
|
||||||
IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount
|
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
|
||||||
from hy_partner_line_info
|
from hy_partner_line_info
|
||||||
<where>
|
<where>
|
||||||
<if test="userId!=null and userId!=''">
|
<if test="userId!=null and userId!=''">
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
|
|
||||||
<select id="selectStageFollowCount" resultType="com.cool.store.dto.partner.StageCountDTO">
|
<select id="selectStageFollowCount" resultType="com.cool.store.dto.partner.StageCountDTO">
|
||||||
select
|
select
|
||||||
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
|
IFNULL(sum(if(workflow_stage=1 and workflow_status = 0,1,0)),0) as intentApplyApproveCount,
|
||||||
IFNULL(sum(if(workflow_stage=2 and workflow_status = 0,1,0)),0) as reservationInterviewCount,
|
IFNULL(sum(if(workflow_stage=2 and workflow_status = 0,1,0)),0) as reservationInterviewCount,
|
||||||
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
|
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
|
||||||
from hy_partner_line_info
|
from hy_partner_line_info
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<result column="message" jdbcType="VARCHAR" property="message" />
|
<result column="message" jdbcType="VARCHAR" property="message" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="partner_id" jdbcType="BIGINT" property="partnerId" />
|
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyPartnerTaskInfoLogDO">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyPartnerTaskInfoLogDO">
|
||||||
<result column="field_copy" jdbcType="LONGVARCHAR" property="fieldCopy" />
|
<result column="field_copy" jdbcType="LONGVARCHAR" property="fieldCopy" />
|
||||||
|
|||||||
@@ -46,8 +46,18 @@ public class HyPartnerTaskInfoLogDO implements Serializable {
|
|||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
@ApiModelProperty("hy_partner_user_info.partner_id")
|
@ApiModelProperty("hy_partner_user_info.partner_id")
|
||||||
private Long partnerId;
|
private String partnerId;
|
||||||
|
|
||||||
@ApiModelProperty("字段备份")
|
@ApiModelProperty("字段备份")
|
||||||
private String fieldCopy;
|
private String fieldCopy;
|
||||||
|
|
||||||
|
public HyPartnerTaskInfoLogDO(String partnerId, Long partnerLineId, String workflowStage, String workflowStatus, String operateUserId, String operateUsername, String message) {
|
||||||
|
this.partnerId = partnerId;
|
||||||
|
this.partnerLineId = partnerLineId;
|
||||||
|
this.workflowStage = workflowStage;
|
||||||
|
this.workflowStatus = workflowStatus;
|
||||||
|
this.operateUserId = operateUserId;
|
||||||
|
this.operateUsername = operateUsername;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.vo;
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import com.cool.store.request.WantShopInfoRequest;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -51,7 +52,7 @@ public class PartnerIntentInfoVO {
|
|||||||
private Integer isHaveWantShop;
|
private Integer isHaveWantShop;
|
||||||
|
|
||||||
@ApiModelProperty("意向铺位信息,json字段,最多5个")
|
@ApiModelProperty("意向铺位信息,json字段,最多5个")
|
||||||
private String wantShopInfo;
|
private List<WantShopInfoVO> wantShopInfo;
|
||||||
|
|
||||||
@ApiModelProperty("最大预算")
|
@ApiModelProperty("最大预算")
|
||||||
private String maxBudget;
|
private String maxBudget;
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import com.cool.store.request.WantShopInfoRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2023/6/25 15:53
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WantShopInfoVO {
|
||||||
|
|
||||||
|
|
||||||
|
private ShopInfoVO shopInfo;
|
||||||
|
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
static class ShopInfoVO{
|
||||||
|
private ShopAddressVO shopAddress;
|
||||||
|
|
||||||
|
private String storeIsTakeDown;
|
||||||
|
|
||||||
|
private String takeDown;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
static class ShopAddressVO{
|
||||||
|
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ public interface HyPartnerBaseInfoService {
|
|||||||
*/
|
*/
|
||||||
Boolean addTags(AddTagsRequest addTagsRequest);
|
Boolean addTags(AddTagsRequest addTagsRequest);
|
||||||
|
|
||||||
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request);
|
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request, PartnerUserInfoVO currentUser);
|
||||||
|
|
||||||
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.dao.HyPartnerBaseInfoDAO;
|
import com.cool.store.dao.HyPartnerBaseInfoDAO;
|
||||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||||
|
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||||
|
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.LineStatusEnum;
|
import com.cool.store.enums.LineStatusEnum;
|
||||||
@@ -53,6 +55,10 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
@Resource
|
@Resource
|
||||||
private RedisUtilPool redisUtilPool;
|
private RedisUtilPool redisUtilPool;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean addTags(AddTagsRequest addTagsRequest) {
|
public Boolean addTags(AddTagsRequest addTagsRequest) {
|
||||||
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = new HyPartnerBaseInfoDO();
|
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = new HyPartnerBaseInfoDO();
|
||||||
@@ -69,7 +75,7 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request) {
|
public Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request, PartnerUserInfoVO currentUser) {
|
||||||
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
|
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
|
||||||
if(!request.getSubmitFlag()){
|
if(!request.getSubmitFlag()){
|
||||||
// 自动保存时
|
// 自动保存时
|
||||||
@@ -94,6 +100,10 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||||
hyPartnerBaseInfoDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_1.getCode()));
|
hyPartnerBaseInfoDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_1.getCode()));
|
||||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfoDO);
|
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfoDO);
|
||||||
|
|
||||||
|
HyPartnerTaskInfoLogDO logDO = new HyPartnerTaskInfoLogDO(request.getPartnerId(), request.getPartnerLineId(), WorkflowStageEnum.INTENT.getCode(), WorkflowStatusEnum.INTENT_1.getCode(), currentUser.getPartnerId(), currentUser.getUsername(), null);
|
||||||
|
|
||||||
|
hyPartnerTaskInfoLogDAO.insertSelective(logDO);
|
||||||
}
|
}
|
||||||
// 清空暂存信息
|
// 清空暂存信息
|
||||||
redisUtilPool.delKey(cacheKey);
|
redisUtilPool.delKey(cacheKey);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.cool.store.utils.StringUtil;
|
|||||||
import com.cool.store.vo.PartnerIntentApplyInfoVO;
|
import com.cool.store.vo.PartnerIntentApplyInfoVO;
|
||||||
import com.cool.store.vo.PartnerIntentInfoVO;
|
import com.cool.store.vo.PartnerIntentInfoVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.cool.store.vo.WantShopInfoVO;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -159,7 +160,9 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
}
|
}
|
||||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
|
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
|
||||||
PartnerIntentInfoVO intentInfoVO = new PartnerIntentInfoVO();
|
PartnerIntentInfoVO intentInfoVO = new PartnerIntentInfoVO();
|
||||||
|
intentInfoVO.setLiveArea(userInfoVO.getLiveArea());
|
||||||
intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea());
|
intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea());
|
||||||
|
intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType());
|
||||||
if (intentInfoDO != null){
|
if (intentInfoDO != null){
|
||||||
BeanUtil.copyProperties(intentInfoDO, intentInfoVO);
|
BeanUtil.copyProperties(intentInfoDO, intentInfoVO);
|
||||||
}
|
}
|
||||||
@@ -223,7 +226,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
partnerIntentInfoVO.setOtherBand(hyPartnerIntentInfoDO.getOtherBand());
|
partnerIntentInfoVO.setOtherBand(hyPartnerIntentInfoDO.getOtherBand());
|
||||||
partnerIntentInfoVO.setStrength(hyPartnerIntentInfoDO.getStrength());
|
partnerIntentInfoVO.setStrength(hyPartnerIntentInfoDO.getStrength());
|
||||||
partnerIntentInfoVO.setNeedImprove(hyPartnerIntentInfoDO.getNeedImprove());
|
partnerIntentInfoVO.setNeedImprove(hyPartnerIntentInfoDO.getNeedImprove());
|
||||||
partnerIntentInfoVO.setWantShopInfo(hyPartnerIntentInfoDO.getWantShopInfo());
|
partnerIntentInfoVO.setWantShopInfo(JSONObject.parseArray(hyPartnerIntentInfoDO.getWantShopInfo(), WantShopInfoVO.class));
|
||||||
return partnerIntentInfoVO;
|
return partnerIntentInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class RegionController {
|
|||||||
|
|
||||||
@ApiOperation("查询所有被绑定战区的组织机构")
|
@ApiOperation("查询所有被绑定战区的组织机构")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "type", value = "intent-意向区域 development 开发区域", required = false)
|
@ApiImplicitParam(name = "type", value = "intent-意向区域 dev 开发区域", required = false)
|
||||||
})
|
})
|
||||||
@GetMapping("/queryAllBingZoneRegionList")
|
@GetMapping("/queryAllBingZoneRegionList")
|
||||||
public ResponseResult<List<String>> queryAllBingZoneRegionList(@RequestParam(value = "type",required = false)String type){
|
public ResponseResult<List<String>> queryAllBingZoneRegionList(@RequestParam(value = "type",required = false)String type){
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ public class PartnerController {
|
|||||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest baseInfoRequest){
|
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest baseInfoRequest){
|
||||||
//前提 未提交加盟申请
|
//前提 未提交加盟申请
|
||||||
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||||
return ResponseResult.success(hyPartnerBaseInfoService.submitPartnerBaseInfo(baseInfoRequest));
|
PartnerUserInfoVO currentUser = PartnerUserHolder.getUser();
|
||||||
|
return ResponseResult.success(hyPartnerBaseInfoService.submitPartnerBaseInfo(baseInfoRequest, currentUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/submitPartnerClerkInfo")
|
@PostMapping(path = "/submitPartnerClerkInfo")
|
||||||
|
|||||||
Reference in New Issue
Block a user