Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -59,4 +59,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
|||||||
* @param lineInfoParam
|
* @param lineInfoParam
|
||||||
*/
|
*/
|
||||||
void insertOrUpdate(@Param("param") LineInfoDO lineInfoParam);
|
void insertOrUpdate(@Param("param") LineInfoDO lineInfoParam);
|
||||||
|
|
||||||
|
void toExperiencing(@Param("lineIds") List<Long> lineIds,
|
||||||
|
@Param("code") Integer code);
|
||||||
}
|
}
|
||||||
@@ -19,4 +19,11 @@ public interface TrainingExperienceMapper {
|
|||||||
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
|
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
|
||||||
|
|
||||||
List<LeaseBaseInfoDO> selectByLineIds(@Param("lineIds") List<Long> lineIds);
|
List<LeaseBaseInfoDO> selectByLineIds(@Param("lineIds") List<Long> lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日的门店体验数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LeaseBaseInfoDO> selectESTime();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,6 +280,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
<update id="toExperiencing">
|
||||||
|
UPDATE
|
||||||
|
xfsg_line_info
|
||||||
|
SET workflow_sub_stage_status = #{code}
|
||||||
|
WHERE
|
||||||
|
deleted = 0
|
||||||
|
AND workflow_sub_stage_status = 85
|
||||||
|
AND id in
|
||||||
|
<foreach collection="lineIds" item="lineId" open="(" close=")" separator=",">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getByPartnerId" resultMap="BaseResultMap">
|
<select id="getByPartnerId" resultMap="BaseResultMap">
|
||||||
select * from xfsg_line_info where partner_id = #{partnerId} and deleted = 0
|
select * from xfsg_line_info where partner_id = #{partnerId} and deleted = 0
|
||||||
|
|||||||
@@ -88,6 +88,15 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectESTime" resultType="com.cool.store.entity.LeaseBaseInfoDO">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM
|
||||||
|
xfsg_lease_base_info
|
||||||
|
WHERE
|
||||||
|
DATE(experience_start_time) = CURDATE()
|
||||||
|
AND deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
|
import com.cool.store.dao.RegionAreaConfigDao;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -48,6 +49,9 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
@Resource
|
@Resource
|
||||||
UserAuthMappingService userAuthMappingService;
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RegionAreaConfigDao regionAreaConfigDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(JoinIntentionRequest request) {
|
public boolean submit(JoinIntentionRequest request) {
|
||||||
@@ -68,14 +72,15 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
}
|
}
|
||||||
//todo 目前写死为进入私海
|
//todo 目前写死为进入私海
|
||||||
lineInfoParam.setLineStatus(1);
|
lineInfoParam.setLineStatus(1);
|
||||||
|
if (lineInfoParam.getWantShopAreaId() != null){
|
||||||
|
Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||||
|
lineInfoParam.setRegionId(regionId);
|
||||||
|
}
|
||||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||||
|
|
||||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||||
memberQuestionDO.setLineId(lineInfoParam.getId());
|
memberQuestionDO.setLineId(lineInfoParam.getId());
|
||||||
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
||||||
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
|||||||
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
||||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||||
lineInfoDO.setId(request.getLineId());
|
lineInfoDO.setId(request.getLineId());
|
||||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class SignValidateFilter implements Filter {
|
|||||||
"/**/swagger*/**",
|
"/**/swagger*/**",
|
||||||
"/**/webjars/**",
|
"/**/webjars/**",
|
||||||
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery",
|
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery",
|
||||||
// "/xfsg/mini/**",
|
"/xfsg/mini/**",
|
||||||
"/xfsg/*/api/audit/result"
|
"/xfsg/*/api/audit/result"
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class TokenValidateFilter implements Filter {
|
|||||||
String userStr = "";
|
String userStr = "";
|
||||||
LoginUserInfo currentUser = null;
|
LoginUserInfo currentUser = null;
|
||||||
boolean isInWhiteList = excludePath(uri);
|
boolean isInWhiteList = excludePath(uri);
|
||||||
String accessToken = "1d1c34451b51e7180445b74c49b7ab09";//reqs.getHeader("accessToken");
|
String accessToken = reqs.getHeader("accessToken");
|
||||||
String key = MessageFormat.format(CommonConstants.ACCESS_TOKEN_KEY, accessToken);
|
String key = MessageFormat.format(CommonConstants.ACCESS_TOKEN_KEY, accessToken);
|
||||||
if(StringUtils.isNotBlank(accessToken)){
|
if(StringUtils.isNotBlank(accessToken)){
|
||||||
userStr = redisUtilPool.getString(key);
|
userStr = redisUtilPool.getString(key);
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ public class KdzApiController {
|
|||||||
public ResponseResult<Boolean> auditResult(@PathVariable(value = "enterprise-id") String eid,
|
public ResponseResult<Boolean> auditResult(@PathVariable(value = "enterprise-id") String eid,
|
||||||
@RequestBody XfsgOpenApiRequest request) {
|
@RequestBody XfsgOpenApiRequest request) {
|
||||||
log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
||||||
// if(!verifyMD5(request,eid)){
|
if(!verifyMD5(request,eid)){
|
||||||
// return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
// }
|
}
|
||||||
// if(eid == null || request.getBizContent() == null){
|
if(eid == null || request.getBizContent() == null){
|
||||||
// return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
// }
|
}
|
||||||
AuditResultRequest auditResultRequest = JSONObject.parseObject(request.getBizContent(), AuditResultRequest.class);
|
AuditResultRequest auditResultRequest = JSONObject.parseObject(request.getBizContent(), AuditResultRequest.class);
|
||||||
return ResponseResult.success(kdzApiService.auditResult(auditResultRequest));
|
return ResponseResult.success(kdzApiService.auditResult(auditResultRequest));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,49 @@
|
|||||||
package com.cool.store.job;
|
package com.cool.store.job;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||||
import com.xxl.job.core.context.XxlJobHelper;
|
import com.xxl.job.core.context.XxlJobHelper;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class XxlJobHandler {
|
public class XxlJobHandler {
|
||||||
|
|
||||||
|
|
||||||
@XxlJob("A")
|
@Resource
|
||||||
public void A(){
|
TrainingExperienceMapper trainingExperienceMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
log.info("A结束");
|
/**
|
||||||
|
* 每天都将待体验门店信息变更到体验中
|
||||||
|
*/
|
||||||
|
@XxlJob("updateStoreExperience")
|
||||||
|
public void updateStoreExperience() {
|
||||||
|
log.info("------实训体验状态变更------");
|
||||||
|
String param = XxlJobHelper.getJobParam();
|
||||||
|
String enterpriseId = param;
|
||||||
|
//查出数据并更新为体验中
|
||||||
|
List<LeaseBaseInfoDO> leaseBaseInfoDOS = trainingExperienceMapper.selectESTime();
|
||||||
|
if (CollectionUtils.isEmpty(leaseBaseInfoDOS)) {
|
||||||
|
log.info("------今日没有待更新数据------");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//线索ids
|
||||||
|
List<Long> lineIds = leaseBaseInfoDOS.stream().map(LeaseBaseInfoDO::getLineId).collect(Collectors.toList());
|
||||||
|
WorkflowSubStageStatusEnum storeExperience90 = WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90;
|
||||||
|
lineInfoMapper.toExperiencing(lineIds, storeExperience90.getCode());
|
||||||
|
log.info("------实训体验状态变更结束------");
|
||||||
XxlJobHelper.handleSuccess();
|
XxlJobHelper.handleSuccess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user