|
@@ -165,6 +165,7 @@ public class TaPersonController extends BaseController {
|
165
|
165
|
person.setPersonType(CommConstant.PERSON_ESTATE_CHANNEL);
|
166
|
166
|
QueryWrapper<TaChannel> queryWrapper = new QueryWrapper();
|
167
|
167
|
queryWrapper.eq("channel_code",channelCode);
|
|
168
|
+ queryWrapper.eq("org_id",orgId);
|
168
|
169
|
TaChannel channel = taChannelService.getOne(queryWrapper);
|
169
|
170
|
if (null == channel){
|
170
|
171
|
return ResponseBean.error("渠道码不存在",ResponseBean.ERROR_UNAVAILABLE);
|
|
@@ -541,6 +542,12 @@ public class TaPersonController extends BaseController {
|
541
|
542
|
@RequestMapping(value="/wx/customer/recommend/becomeChannel",method= RequestMethod.PUT)
|
542
|
543
|
public ResponseBean taRecommendAgentBecomeChannel(@RequestParam(required = false) String channelCode,HttpServletRequest request,@RequestParam("personType")String personType){
|
543
|
544
|
ResponseBean responseBean = new ResponseBean();
|
|
545
|
+
|
|
546
|
+ if (org.apache.commons.lang3.StringUtils.isBlank(personType)) {
|
|
547
|
+ responseBean.addSuccess("personType为空");
|
|
548
|
+ return responseBean;
|
|
549
|
+ }
|
|
550
|
+
|
544
|
551
|
String openid = getOpenId(request);
|
545
|
552
|
List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
546
|
553
|
if (null == taPersons || taPersons.size() != 1) {
|
|
@@ -551,6 +558,7 @@ public class TaPersonController extends BaseController {
|
551
|
558
|
if(CommConstant.PERSON_ESTATE_CHANNEL.equals(personType)){
|
552
|
559
|
QueryWrapper<TaChannel>channelQueryWrapper = new QueryWrapper<>();
|
553
|
560
|
channelQueryWrapper.eq("channel_code",channelCode);
|
|
561
|
+ channelQueryWrapper.eq("org_id",getOrgId(request));
|
554
|
562
|
QueryWrapper<TaChannelPerson>channelPersonQueryWrapper = new QueryWrapper<>();
|
555
|
563
|
List<TaChannel> channel = taChannelService.list(channelQueryWrapper);
|
556
|
564
|
if(channel.size()>0){
|