leon 5 lat temu
rodzic
commit
978d050362

+ 6 - 5
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxMobileController.java

@@ -9,6 +9,7 @@ import com.mokamrp.privates.entity.DelHandle;
 import com.mokamrp.privates.entity.EditHandle;
 import com.mokamrp.privates.controller.BaseController;
 import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.mokamrp.privates.entity.pangu.GetForsterwxMobileHandle;
 import com.mokamrp.privates.help.AjaxResult;
 import com.mokamrp.privates.interceptor.AuthUser;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
@@ -61,11 +62,11 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
      */
 
     @PostMapping("/list")
-    public Object list(@Valid @RequestBody PostBasePageHandle postBasePageHandle, BindingResult bindingResult) {
+    public Object list(@Valid @RequestBody GetForsterwxMobileHandle getForsterwxMobileHandle, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
         }
-        Map<String, Object> res = fosterwxMobileService.getList(postBasePageHandle);
+        Map<String, Object> res = fosterwxMobileService.getList(getForsterwxMobileHandle);
         return AjaxResult.success(res);
     }
 
@@ -88,7 +89,7 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
         fosterwxMobileService.save(addHandle.getRaw());
         // 判断开始做任务时间是否设置了
         AjaxResult ajaxResult = null;
-        if (null != addHandle.getRaw().getTaskStartAt() && addHandle.getRaw().getWxStatus() != 2) {
+        if (null != addHandle.getRaw().getTaskStartAt()) {
             ajaxResult = fosterwxTaskScheduleService.insertByTaskDate(addHandle.getRaw(), authUser, false);
         }
 
@@ -134,7 +135,7 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
 
     @PostMapping("/getMobileList")
     public Object getMobileList(@RequestParam(name = "token") String token,
-                                @Valid @RequestBody PostBasePageHandle postBasePageHandle, BindingResult bindingResult) {
+                                @Valid @RequestBody GetForsterwxMobileHandle getForsterwxMobileHandle, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
         }
@@ -143,7 +144,7 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
         if (fosterwxStation == null){
             return AjaxResult.error(HttpStatus.LOGIN_ERROR, HttpMsg.needLogin);
         }
-        Map<String, Object> res = fosterwxMobileService.getListByStationId(postBasePageHandle.getPage(),postBasePageHandle.getPagesize(),fosterwxStation.getId());
+        Map<String, Object> res = fosterwxMobileService.getListByStationId(getForsterwxMobileHandle,fosterwxStation.getId());
         return AjaxResult.success(res);
     }
 

+ 1 - 1
src/main/java/com/mokamrp/privates/entity/pangu/GetForsterwxMobileHandle.java

@@ -7,7 +7,7 @@ public class GetForsterwxMobileHandle {
     private Integer page;
     private Integer pagesize;
     private Integer id;
-    private String mobileCode;
+    private Integer mobileCode;
     private String mobileNo;
     private Integer workWxStatus;
     private Integer mobileOperator;

+ 3 - 2
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxMobileMapper.java

@@ -1,5 +1,6 @@
 package com.mokamrp.privates.mapper.pangu;
 
+import com.mokamrp.privates.entity.pangu.GetForsterwxMobileHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -17,6 +18,6 @@ import java.util.List;
  */
 @Component
 public interface FosterwxMobileMapper extends BaseMapper<FosterwxMobile> {
-    public List<FosterwxMobile> getList(Page<FosterwxMobile> pageObj);
-    public List<FosterwxMobile> getListByStationId(Page<FosterwxMobile> pageObj,@Param("stationId") Integer stationId);
+    public List<FosterwxMobile> getList(Page<FosterwxMobile> pageObj,@Param("param") GetForsterwxMobileHandle getForsterwxMobileHandle);
+    public List<FosterwxMobile> getListByStationId(Page<FosterwxMobile> pageObj, @Param("param") GetForsterwxMobileHandle getForsterwxMobileHandle, @Param("stationId") Integer stationId);
 }

+ 23 - 2
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxMobileMapper.xml

@@ -36,10 +36,31 @@
         id, station_id, mobile_code, mobile_no, mobile_operator, mobile_create_at, mobile_advance_pay_amt, mobile_combo, mobile_combo_flow, mobile_real_name, mobile_identity_card_no, status, wx_status, wx_password, wx_real_name, wx_identity_card_no, wx_register_at, bank_card_no, bank_card_mobile_no, work_wx_corp, work_wx_register_at, work_wx_status, task_start_at, create_at, update_at
     </sql>
     <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile">
-        SELECT * FROM pan_fosterwx_mobile order by id desc
+        SELECT * FROM pan_fosterwx_mobile
+        <where>
+            <if test="param.id != null">and id = #{param.id}</if>
+            <if test="param.mobileCode != null">and mobile_code = #{param.mobileCode}</if>
+            <if test="param.mobileNo != null">and mobile_no = #{param.mobileNo}</if>
+            <if test="param.workWxStatus != null">and work_wx_status = #{param.workWxStatus}</if>
+            <if test="param.mobileOperator != null">and mobile_operator = #{param.mobileOperator}</if>
+            <if test="param.wxStatus != null">and id = #{param.wxStatus}</if>
+            <if test="param.status != null">and id = #{param.status}</if>
+        </where>
+        order by id desc
     </select>
 
     <select id="getListByStationId" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile">
-        SELECT * FROM pan_fosterwx_mobile WHERE station_id = #{stationId} order by id desc
+        SELECT * FROM pan_fosterwx_mobile
+        <where>
+            and station_id = #{stationId}
+            <if test="param.id != null">and id = #{param.id}</if>
+            <if test="param.mobileCode != null">and mobile_code = #{param.mobileCode}</if>
+            <if test="param.mobileNo != null">and mobile_no = #{param.mobileNo}</if>
+            <if test="param.workWxStatus != null">and work_wx_status = #{param.workWxStatus}</if>
+            <if test="param.mobileOperator != null">and mobile_operator = #{param.mobileOperator}</if>
+            <if test="param.wxStatus != null">and id = #{param.wxStatus}</if>
+            <if test="param.status != null">and id = #{param.status}</if>
+        </where>
+        WHERE station_id = #{stationId} order by id desc
     </select>
 </mapper>

+ 3 - 2
src/main/java/com/mokamrp/privates/service/pangu/FosterwxMobileService.java

@@ -1,5 +1,6 @@
 package com.mokamrp.privates.service.pangu;
 
+import com.mokamrp.privates.entity.pangu.GetForsterwxMobileHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.mokamrp.privates.entity.PostBasePageHandle;
@@ -14,7 +15,7 @@ import java.util.Map;
  */
 public interface FosterwxMobileService extends IService<FosterwxMobile> {
     //.@leon 获取数据列表
-    public Map<String, Object> getList(PostBasePageHandle handle);
+    public Map<String, Object> getList(GetForsterwxMobileHandle handle);
     //.@leon 获取指定站点下账号列表
-    public Map<String, Object> getListByStationId(Integer page,Integer pagesize,Integer stationId);
+    public Map<String, Object> getListByStationId(GetForsterwxMobileHandle getForsterwxMobileHandle, Integer stationId);
 }

+ 7 - 7
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxMobileServiceImpl.java

@@ -1,6 +1,7 @@
 package com.mokamrp.privates.service.pangu.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.mokamrp.privates.entity.pangu.GetForsterwxMobileHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
 import com.mokamrp.privates.mapper.pangu.FosterwxMobileMapper;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileWxfriend;
@@ -35,11 +36,11 @@ public class FosterwxMobileServiceImpl extends ServiceImpl<FosterwxMobileMapper,
      * @param handle
      * @return
      */
-    public Map<String, Object> getList(PostBasePageHandle handle) {
+    public Map<String, Object> getList(GetForsterwxMobileHandle handle) {
         Integer pagesize = handle.getPagesize();
         Integer page = handle.getPage();
         Page<FosterwxMobile> pageObj = new Page<FosterwxMobile>(page, pagesize);
-        List<FosterwxMobile> list = fosterwxMobileMapper.getList(pageObj);
+        List<FosterwxMobile> list = fosterwxMobileMapper.getList(pageObj,handle);
         Map<String, Object> resMap = new HashMap<String, Object>();
         resMap.put("list", list);
         resMap.put("total", pageObj.getTotal());
@@ -48,14 +49,13 @@ public class FosterwxMobileServiceImpl extends ServiceImpl<FosterwxMobileMapper,
 
     /**
      * 获取指定站点下账号列表
-     * @param page
-     * @param pagesize
+     * @param getForsterwxMobileHandle
      * @param stationId
      * @return
      */
-    public Map<String, Object> getListByStationId(Integer page,Integer pagesize,Integer stationId) {
-        Page<FosterwxMobile> pageObj = new Page<FosterwxMobile>(page, pagesize);
-        List<FosterwxMobile> list = fosterwxMobileMapper.getListByStationId(pageObj,stationId);
+    public Map<String, Object> getListByStationId(GetForsterwxMobileHandle getForsterwxMobileHandle, Integer stationId) {
+        Page<FosterwxMobile> pageObj = new Page<FosterwxMobile>(getForsterwxMobileHandle.getPage(), getForsterwxMobileHandle.getPagesize());
+        List<FosterwxMobile> list = fosterwxMobileMapper.getListByStationId(pageObj,getForsterwxMobileHandle,stationId);
         Map<String, Object> resMap = new HashMap<String, Object>();
         resMap.put("list", list);
         resMap.put("total", pageObj.getTotal());