傅行帆 3 gadus atpakaļ
vecāks
revīzija
370c45742b

+ 1
- 0
src/main/java/com/yunzhi/marketing/controller/MiniAppController.java Parādīt failu

@@ -369,6 +369,7 @@ public class MiniAppController extends BaseController {
369 369
             TaUser user = userService.getById(taPerson.getUserId());
370 370
             if (null != user) {
371 371
                 taPerson.setUserPhoto(user.getPhoto());
372
+                taPerson.setDescription(user.getDescription());
372 373
             }
373 374
             Map<String, Object> result = new HashMap<>();
374 375
             result.put("miniApp", miniResp);

+ 4
- 5
src/main/java/com/yunzhi/marketing/controller/TaChannelController.java Parādīt failu

@@ -89,6 +89,7 @@ public class TaChannelController extends BaseController {
89 89
     @RequestMapping(value="/admin/channel",method= RequestMethod.GET)
90 90
     public ResponseBean channelList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
91 91
                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
92
+                                    @RequestParam(value ="institutionId",required = false) String institutionId,
92 93
                                     @RequestParam(value ="channelId",required = false) Integer channelId,
93 94
                                     HttpServletRequest request){
94 95
         ResponseBean responseBean = new ResponseBean();
@@ -97,7 +98,7 @@ public class TaChannelController extends BaseController {
97 98
         try {
98 99
             //使用分页插件
99 100
 		    IPage<TaChannel> pg = new Page<>(pageNum, pageSize);
100
-            IPage<TaChannel> result = taChannelMapper.pageTaChannel(pg,orgId,channelId,getInstitutionIds(request));
101
+            IPage<TaChannel> result = taChannelMapper.pageTaChannel(pg,orgId,channelId,getInstitutionIds(request),institutionId);
101 102
             List<TaChannel> recommendCount = taChannelMapper.recommendCount(orgId, channelId, getInstitutionIds(request));
102 103
 
103 104
             result.getRecords().stream().forEach(e -> {
@@ -174,10 +175,6 @@ public class TaChannelController extends BaseController {
174 175
                 channelPersonLambdaQueryWrapper.eq(TaChannelPerson::getChannelId,id);
175 176
                 //查询出所有的渠道person
176 177
                 List<TaChannelPerson> list = taChannelPersonService.list(channelPersonLambdaQueryWrapper);
177
-                TaChannelPerson taChannelPerson = new TaChannelPerson();
178
-                taChannelPerson.setStatus(CommConstant.STATUS_DELETE);
179
-                // 把所有的渠道person 更新为删除状态
180
-                taChannelPersonService.update(taChannelPerson, channelPersonLambdaQueryWrapper);
181 178
 
182 179
                 // 把所有的person的type 更新为普通用户
183 180
                 list.forEach(e -> {
@@ -185,6 +182,8 @@ public class TaChannelController extends BaseController {
185 182
                     taPerson.setPersonType(CommConstant.PERSON_ESTATE_CUSTOMER);
186 183
                     taPersonService.updateById(taPerson);
187 184
                 });
185
+                // 把所有的渠道person 更新为删除状态
186
+                taChannelPersonService.removeByIds(list);
188 187
                 responseBean.addSuccess("success");
189 188
             }else {
190 189
                 responseBean.addError("fail");

+ 3
- 1
src/main/java/com/yunzhi/marketing/controller/TaPersonController.java Parādīt failu

@@ -576,7 +576,8 @@ public class TaPersonController extends BaseController {
576 576
     }
577 577
 
578 578
     @PutMapping("/wx/editPerson")
579
-    public ResponseBean editWxConsultant(@RequestParam(required = false)String name,@RequestParam(required = false)String avatar,@RequestParam(required = false)String phone,HttpServletRequest request) {
579
+    public ResponseBean editWxConsultant(@RequestParam(required = false)String name,@RequestParam(required = false)String avatar,@RequestParam(required = false)String phone,
580
+                                         @RequestParam(required = false)String description,HttpServletRequest request) {
580 581
         ResponseBean responseBean = new ResponseBean();
581 582
         String openid = getOpenId(request);
582 583
         List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
@@ -597,6 +598,7 @@ public class TaPersonController extends BaseController {
597 598
                 TaUser user = taUserService.getById(person.getUserId());
598 599
                 user.setPhone(phone);
599 600
                 user.setLoginName(phone);
601
+                user.setDescription(description);
600 602
                 taUserService.updateById(user);
601 603
             }
602 604
         }

+ 6
- 0
src/main/java/com/yunzhi/marketing/entity/TaPerson.java Parādīt failu

@@ -356,4 +356,10 @@ public class TaPerson implements Serializable {
356 356
      */
357 357
     @TableField(exist = false)
358 358
     private List<TaChannel> channelList;
359
+
360
+    /**
361
+     * 简介
362
+     */
363
+    @TableField(exist = false)
364
+    private String description;
359 365
 }

+ 1
- 1
src/main/java/com/yunzhi/marketing/mapper/TaChannelMapper.java Parādīt failu

@@ -44,7 +44,7 @@ public interface TaChannelMapper extends BaseMapper<TaChannel> {
44 44
      * @param pg
45 45
      * @return
46 46
      */
47
-    IPage<TaChannel> pageTaChannel(IPage<TaChannel> pg,@Param("orgId")Integer orgId,@Param("channelId")Integer channelId,@Param("institutionIds") List<String> institutionIds);
47
+    IPage<TaChannel> pageTaChannel(IPage<TaChannel> pg,@Param("orgId")Integer orgId,@Param("channelId")Integer channelId,@Param("institutionIds") List<String> institutionIds,@Param("institutionId") String institutionId);
48 48
 
49 49
     List<TaChannel> recommendCount(@Param("orgId")Integer orgId,@Param("channelId")Integer channelId,@Param("institutionIds") List<String> institutionIds);
50 50
 

+ 3
- 0
src/main/resources/mapper/TaChannelMapper.xml Parādīt failu

@@ -32,6 +32,9 @@
32 32
             and c.org_id = #{orgId}
33 33
             and c.status = 1
34 34
 
35
+            <if test="institutionId != null and institutionId != ''">
36
+                AND c.institution_id = #{institutionId}
37
+            </if>
35 38
             <if test="institutionIds != null and institutionIds.size > 0">
36 39
                 AND c.institution_id in
37 40
                 <foreach collection="institutionIds" item="item" open="(" close=")" separator=",">