leon 4 лет назад
Родитель
Сommit
fbc4e4ee9d

+ 9 - 16
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxMobileCashController.java → src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashMobileController.java

@@ -6,19 +6,16 @@ import com.mokamrp.privates.entity.PostBasePageHandle;
 import com.mokamrp.privates.entity.SetIdsHandle;
 import com.mokamrp.privates.help.AjaxResult;
 import com.mokamrp.privates.entity.ResHandle;
-import org.apache.tomcat.jni.Local;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
-import com.mokamrp.privates.service.pangu.FosterwxMobileCashService;
-import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash;
+import com.mokamrp.privates.service.pangu.FosterwxCashMobileService;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
 import com.mokamrp.privates.controller.BaseController;
 import javax.validation.Valid;
 import java.time.LocalDateTime;
-import java.util.Map;
 import java.util.List;
 
 import org.springframework.web.bind.annotation.RestController;
@@ -33,11 +30,11 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2021-10-08
  */
 @RestController
-@RequestMapping("/pangu/fosterwxMobileCash")
-public class FosterwxMobileCashController extends BaseController<FosterwxMobileCash> {
+@RequestMapping("/fosterwxCashMobile")
+public class FosterwxCashMobileController extends BaseController<FosterwxCashMobile> {
 
     @Autowired
-    public FosterwxMobileCashService fosterwxMobileCashService;
+    public FosterwxCashMobileService fosterwxCashMobileService;
 
     /*
      * @fast
@@ -50,24 +47,20 @@ public class FosterwxMobileCashController extends BaseController<FosterwxMobileC
         if (bindingResult.hasErrors()) {
             return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
         }
-        ResHandle<List<FosterwxMobileCash>> res = fosterwxMobileCashService.getList(postBasePageHandle);
+        ResHandle<List<FosterwxCashMobile>> res = fosterwxCashMobileService.getList(postBasePageHandle);
         return AjaxResult.success(res);
     }
 
-
     @PostMapping("/setDomain")
-    public Object setDoamin(@Valid @RequestBody SetIdsHandle setIdsHandle,BindingResult bindingResult){
+    public Object setDoamin(@Valid @RequestBody SetIdsHandle setIdsHandle, BindingResult bindingResult){
         if (bindingResult.hasErrors()) {
             return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
         }
-        FosterwxMobileCash save = new FosterwxMobileCash();
+        FosterwxCashMobile save = new FosterwxCashMobile();
         save.setDomainId(setIdsHandle.getId());
         save.setUpdateAt(LocalDateTime.now());
-        fosterwxMobileCashService.update(save,new QueryWrapper<FosterwxMobileCash>().in("id",setIdsHandle.getIds()));
+        fosterwxCashMobileService.update(save,new QueryWrapper<FosterwxCashMobile>().in("id",setIdsHandle.getIds()));
         return AjaxResult.success();
     }
-
-
-
 }
 

+ 3 - 3
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxMobileCashMapper.java → src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashMobileMapper.java

@@ -1,6 +1,6 @@
 package com.mokamrp.privates.mapper.pangu;
 
-import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.springframework.stereotype.Component;
@@ -16,6 +16,6 @@ import java.util.List;
  * @since 2021-10-08
  */
 @Component
-public interface FosterwxMobileCashMapper extends BaseMapper<FosterwxMobileCash> {
-    public List<FosterwxMobileCash> getList(Page<FosterwxMobileCash> pageObj);
+public interface FosterwxCashMobileMapper extends BaseMapper<FosterwxCashMobile> {
+    public List<FosterwxCashMobile> getList(Page<FosterwxCashMobile> pageObj);
 }

+ 6 - 6
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxMobileCashMapper.xml → src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashMobileMapper.xml

@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.mokamrp.privates.mapper.pangu.FosterwxMobileCashMapper">
+<mapper namespace="com.mokamrp.privates.mapper.pangu.FosterwxCashMobileMapper">
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash">
+    <resultMap id="BaseResultMap" type="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile">
         <id column="id" property="id" />
         <result column="group_id" property="groupId" />
         <result column="station_id" property="stationId" />
         <result column="mobile_id" property="mobileId" />
-        <result column="h5_url" property="h5Url" />
+        <result column="domain_id" property="domainId" />
         <result column="create_at" property="createAt" />
         <result column="update_at" property="updateAt" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, group_id, station_id, mobile_id, h5_url, create_at, update_at
+        id, group_id, station_id, mobile_id, domain_id, create_at, update_at
     </sql>
-    <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash">
-        SELECT * FROM pan_fosterwx_mobile_cash
+    <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile">
+        SELECT * FROM pan_fosterwx_cash_mobile
     </select>
 </mapper>

+ 133 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashMobile.java

@@ -0,0 +1,133 @@
+package com.mokamrp.privates.mapper.pangu.pojo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 盘古个微养号变现账号库
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@TableName("pan_fosterwx_cash_mobile")
+public class FosterwxCashMobile extends Model<FosterwxCashMobile> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+      @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 分组
+     */
+    private Integer groupId;
+
+    /**
+     * 站点id(pan_fosterwx_station.id)
+     */
+    private Integer stationId;
+
+    /**
+     * 账号id
+     */
+    private Integer mobileId;
+
+    /**
+     * 域名id
+     */
+    private Integer domainId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createAt;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateAt;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Integer groupId) {
+        this.groupId = groupId;
+    }
+
+    public Integer getStationId() {
+        return stationId;
+    }
+
+    public void setStationId(Integer stationId) {
+        this.stationId = stationId;
+    }
+
+    public Integer getMobileId() {
+        return mobileId;
+    }
+
+    public void setMobileId(Integer mobileId) {
+        this.mobileId = mobileId;
+    }
+
+    public Integer getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(Integer domainId) {
+        this.domainId = domainId;
+    }
+
+    public LocalDateTime getCreateAt() {
+        return createAt;
+    }
+
+    public void setCreateAt(LocalDateTime createAt) {
+        this.createAt = createAt;
+    }
+
+    public LocalDateTime getUpdateAt() {
+        return updateAt;
+    }
+
+    public void setUpdateAt(LocalDateTime updateAt) {
+        this.updateAt = updateAt;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "FosterwxCashMobile{" +
+        "id=" + id +
+        ", groupId=" + groupId +
+        ", stationId=" + stationId +
+        ", mobileId=" + mobileId +
+        ", domainId=" + domainId +
+        ", createAt=" + createAt +
+        ", updateAt=" + updateAt +
+        "}";
+    }
+}

+ 0 - 60
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxMobileCash.java

@@ -1,60 +0,0 @@
-package com.mokamrp.privates.mapper.pangu.pojo;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.io.Serializable;
-
-/**
- * <p>
- * 盘古个微养号变现账号库
- * </p>
- *
- * @author leon
- * @since 2021-10-08
- */
-@Data
-@TableName("pan_fosterwx_mobile_cash")
-public class FosterwxMobileCash extends Model<FosterwxMobileCash> {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * ID
-     */
-      @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 分组
-     */
-    private Integer groupId;
-
-    /**
-     * 站点id(pan_fosterwx_station.id)
-     */
-    private Integer stationId;
-
-    /**
-     * 账号id
-     */
-    private Integer mobileId;
-
-    private Integer domainId;
-
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createAt;
-
-    /**
-     * 更新时间
-     */
-    private LocalDateTime updateAt;
-
-
-}

+ 3 - 3
src/main/java/com/mokamrp/privates/service/pangu/FosterwxMobileCashService.java → src/main/java/com/mokamrp/privates/service/pangu/FosterwxCashMobileService.java

@@ -1,6 +1,6 @@
 package com.mokamrp.privates.service.pangu;
 
-import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.mokamrp.privates.entity.PostBasePageHandle;
 import com.mokamrp.privates.entity.ResHandle;
@@ -14,7 +14,7 @@ import java.util.Map;
  * @author leon
  * @since 2021-10-08
  */
-public interface FosterwxMobileCashService extends IService<FosterwxMobileCash> {
+public interface FosterwxCashMobileService extends IService<FosterwxCashMobile> {
     //.@leon 获取数据列表
-    public ResHandle<List<FosterwxMobileCash>> getList(PostBasePageHandle handle);
+    public ResHandle<List<FosterwxCashMobile>> getList(PostBasePageHandle handle);
 }

+ 9 - 9
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxMobileCashServiceImpl.java → src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashMobileServiceImpl.java

@@ -1,8 +1,8 @@
 package com.mokamrp.privates.service.pangu.impl;
 
-import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileCash;
-import com.mokamrp.privates.mapper.pangu.FosterwxMobileCashMapper;
-import com.mokamrp.privates.service.pangu.FosterwxMobileCashService;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashMobile;
+import com.mokamrp.privates.mapper.pangu.FosterwxCashMobileMapper;
+import com.mokamrp.privates.service.pangu.FosterwxCashMobileService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import com.mokamrp.privates.entity.PostBasePageHandle;
@@ -21,21 +21,21 @@ import java.util.*;
  * @since 2021-10-08
  */
 @Service
-public class FosterwxMobileCashServiceImpl extends ServiceImpl<FosterwxMobileCashMapper, FosterwxMobileCash> implements FosterwxMobileCashService {
+public class FosterwxCashMobileServiceImpl extends ServiceImpl<FosterwxCashMobileMapper, FosterwxCashMobile> implements FosterwxCashMobileService {
 
     @Autowired
-    public FosterwxMobileCashMapper fosterwxMobileCashMapper;
+    public FosterwxCashMobileMapper fosterwxCashMobileMapper;
     /**
      * 获取数据列表 支持分页
      * @param handle
      * @return
      */
-    public ResHandle<List<FosterwxMobileCash>> getList(PostBasePageHandle handle) {
+    public ResHandle<List<FosterwxCashMobile>> getList(PostBasePageHandle handle) {
         Integer pagesize = handle.getPagesize();
         Integer page = handle.getPage();
-        Page<FosterwxMobileCash> pageObj = new Page<FosterwxMobileCash>(page, pagesize);
-        List<FosterwxMobileCash> list = fosterwxMobileCashMapper.getList(pageObj);
-        ResHandle<List<FosterwxMobileCash>> res = new ResHandle<>();
+        Page<FosterwxCashMobile> pageObj = new Page<FosterwxCashMobile>(page, pagesize);
+        List<FosterwxCashMobile> list = fosterwxCashMobileMapper.getList(pageObj);
+        ResHandle<List<FosterwxCashMobile>> res = new ResHandle<>();
         res.setList(list);
         res.setTotal(pageObj.getTotal());
         return res;

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

@@ -262,7 +262,7 @@ public class FosterwxMobileServiceImpl extends ServiceImpl<FosterwxMobileMapper,
             if (fosterwxMobile != null) {
                 continue;
             }
-            FosterwxMobileCash add = new FosterwxMobileCash();
+            FosterwxCashMobile add = new FosterwxCashMobile();
             add.setMobileId(fosterwxMobile.getId());
             add.setStationId(fosterwxMobile.getStationId());
             add.setCreateAt(now);

+ 1 - 1
src/test/java/com/mokamrp/AutoMPPangu.java

@@ -48,7 +48,7 @@ public class AutoMPPangu {
 				.setColumnNaming(NamingStrategy.underline_to_camel)
 				.setNaming(NamingStrategy.underline_to_camel) // 数据库表映射到实体的命名策略,下划线转驼峰命名
 				.setTablePrefix("pan_") //表名前缀
-				.setInclude("pan_fosterwx_mobile_cash");  //生成的表
+				.setInclude("pan_fosterwx_cash_mobile");  //生成的表
 
 		//4. 包名策略配置
 		PackageConfig pkConfig = new PackageConfig();