Bläddra i källkod

修复活码内个微客服显示异常问题

leon 5 år sedan
förälder
incheckning
7428b1a6fc

+ 2 - 1
src/main/java/com/mokamrp/privates/controller/pangu/PromoteQrcodePoolController.java

@@ -9,6 +9,7 @@ import com.mokamrp.privates.entity.AddHandle;
 import com.mokamrp.privates.entity.DelHandle;
 import com.mokamrp.privates.entity.EditHandle;
 import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.mokamrp.privates.entity.pangu.GetPromoteQrcodePoolHandle;
 import com.mokamrp.privates.entity.pangu.PlaybillListHandle;
 import com.mokamrp.privates.entity.pangu.SetPromoteQrcodeHandle;
 import com.mokamrp.privates.help.AjaxResult;
@@ -62,7 +63,7 @@ public class PromoteQrcodePoolController extends BaseController<PromoteQrcodePoo
      */
 
     @PostMapping("/list")
-    public Object list(@RequestBody PostBasePageHandle pageHandle) {
+    public Object list(@RequestBody GetPromoteQrcodePoolHandle pageHandle) {
         Object res = promoteQrcodePoolService.getlist(pageHandle);
         return AjaxResult.success(res);
     }

+ 11 - 0
src/main/java/com/mokamrp/privates/entity/pangu/GetPromoteQrcodePoolHandle.java

@@ -0,0 +1,11 @@
+package com.mokamrp.privates.entity.pangu;
+
+import lombok.Data;
+
+@Data
+public class GetPromoteQrcodePoolHandle {
+    private Integer page;
+    private Integer pagesize;
+    private Integer promoteId;
+    private Integer id;
+}

+ 2 - 1
src/main/java/com/mokamrp/privates/mapper/pangu/PromoteQrcodePoolMapper.java

@@ -3,6 +3,7 @@ package com.mokamrp.privates.mapper.pangu;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.mokamrp.privates.entity.PostBasePageHandle;
 import com.mokamrp.privates.entity.pangu.CustserviceListHandle;
+import com.mokamrp.privates.entity.pangu.GetPromoteQrcodePoolHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.CustserviceVo;
 import com.mokamrp.privates.mapper.pangu.pojo.PromoteQrcodePool;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -20,5 +21,5 @@ import java.util.List;
  * @since 2021-06-11
  */
 public interface PromoteQrcodePoolMapper extends BaseMapper<PromoteQrcodePool> {
-    public List<PromoteQrcodePoolVo> getlist(IPage<PromoteQrcodePoolVo> page, @Param("pageHandle") PostBasePageHandle pageHandle);
+    public List<PromoteQrcodePoolVo> getlist(IPage<PromoteQrcodePoolVo> page, @Param("pageHandle") GetPromoteQrcodePoolHandle pageHandle);
 }

+ 1 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/PromoteQrcodePoolMapper.xml

@@ -35,6 +35,7 @@
          LEFT join pan_playbill AS B ON A.playbill_id = B.id
          left join pan_custservice AS C ON A.custservice_id = C.id
     <where>
+        <if test="pageHandle.promoteId != null">and A.promote_id = #{pageHandle.promoteId}</if>
         <if test="pageHandle.id != null">and A.id = #{pageHandle.id}</if>
     </where>
     </select>

+ 2 - 1
src/main/java/com/mokamrp/privates/service/pangu/PromoteQrcodePoolService.java

@@ -2,6 +2,7 @@ package com.mokamrp.privates.service.pangu;
 
 import com.mokamrp.privates.entity.PostBasePageHandle;
 import com.mokamrp.privates.entity.pangu.CustserviceListHandle;
+import com.mokamrp.privates.entity.pangu.GetPromoteQrcodePoolHandle;
 import com.mokamrp.privates.entity.pangu.SetPromoteQrcodeHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.PromoteQrcodePool;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -17,7 +18,7 @@ import com.mokamrp.privates.mapper.pangu.pojo.PromoteQrcodePoolVo;
  */
 public interface PromoteQrcodePoolService extends IService<PromoteQrcodePool> {
     //.活码内个微海报码列表
-    public Object getlist(PostBasePageHandle pageHandle);
+    public Object getlist(GetPromoteQrcodePoolHandle pageHandle);
 
     //.通过ID获取信息
     public PromoteQrcodePoolVo getInfoById(String id);

+ 4 - 2
src/main/java/com/mokamrp/privates/service/pangu/impl/PromoteQrcodePoolServiceImpl.java

@@ -3,7 +3,9 @@ package com.mokamrp.privates.service.pangu.impl;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mokamrp.privates.entity.GetEmployeeTagHandle;
 import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.mokamrp.privates.entity.pangu.GetPromoteQrcodePoolHandle;
 import com.mokamrp.privates.entity.pangu.SetPromoteQrcodeHandle;
 import com.mokamrp.privates.mapper.pangu.PromoteCodeMapper;
 import com.mokamrp.privates.mapper.pangu.pojo.CustserviceVo;
@@ -44,7 +46,7 @@ public class PromoteQrcodePoolServiceImpl extends ServiceImpl<PromoteQrcodePoolM
      * @param pageHandle
      * @return
      */
-    public Object getlist(PostBasePageHandle pageHandle){
+    public Object getlist(GetPromoteQrcodePoolHandle pageHandle){
         Page<PromoteQrcodePoolVo> page = new Page<PromoteQrcodePoolVo>(pageHandle.getPage(),pageHandle.getPagesize());
         List<PromoteQrcodePoolVo> list = promoteQrcodePoolMapper.getlist(page,pageHandle);
         Map<String,Object> res = new HashMap<>();
@@ -83,7 +85,7 @@ public class PromoteQrcodePoolServiceImpl extends ServiceImpl<PromoteQrcodePoolM
      * @return
      */
     public PromoteQrcodePoolVo getInfoById(String id){
-        PostBasePageHandle pageHandle = new PostBasePageHandle();
+        GetPromoteQrcodePoolHandle pageHandle = new GetPromoteQrcodePoolHandle();
         pageHandle.setId(Integer.parseInt(id));
         pageHandle.setPage(1);
         pageHandle.setPage(1);