Pārlūkot izejas kodu

修改包名称

yumeng 4 gadi atpakaļ
vecāks
revīzija
9f777538e0

+ 11 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/third/controller/ThirdConfigController.java

@@ -31,9 +31,9 @@ import java.util.List;
 @RequestMapping("/third")
 public class ThirdConfigController {
     @Autowired
-    private IThirdConfigService thirtConfigService;
+    private IThirdConfigService thirdConfigService;
     @Autowired
-    private IThirdConfigAdvertiserService thirtConfigAdvertiserService;
+    private IThirdConfigAdvertiserService thirdConfigAdvertiserService;
 
     @PostMapping(value = "/getAdvertiserList")
     public Result<List<String>> getAdvertiserList(@RequestBody JSONObject requestJson) {
@@ -44,9 +44,9 @@ public class ThirdConfigController {
             if (Check.isNull(appId)) {
                 throw new Exception("必传参数appId不能为空");
             }
-            QueryWrapper<ThirdConfig> thirtConfigQueryWrapper = new QueryWrapper<>();
-            thirtConfigQueryWrapper.eq("app_id", appId);
-            ThirdConfig config = thirtConfigService.getOne(thirtConfigQueryWrapper);
+            QueryWrapper<ThirdConfig> thirdConfigQueryWrapper = new QueryWrapper<>();
+            thirdConfigQueryWrapper.eq("app_id", appId);
+            ThirdConfig config = thirdConfigService.getOne(thirdConfigQueryWrapper);
             if (Check.isNull(config)) {
                 throw new Exception("appId不正确");
             }
@@ -58,7 +58,7 @@ public class ThirdConfigController {
                 throw new Exception("secret不正确");
             }
 
-            List<String> advertiserList = thirtConfigAdvertiserService.getAdvertiserListByAppId(appId);
+            List<String> advertiserList = thirdConfigAdvertiserService.getAdvertiserListByAppId(appId);
             result.setResult(advertiserList);
 
         } catch (Exception e) {
@@ -80,9 +80,9 @@ public class ThirdConfigController {
             if (Check.isNull(appId)) {
                 throw new Exception("必传参数appId不能为空");
             }
-            QueryWrapper<ThirdConfig> thirtConfigQueryWrapper = new QueryWrapper<>();
-            thirtConfigQueryWrapper.eq("app_id", appId);
-            ThirdConfig config = thirtConfigService.getOne(thirtConfigQueryWrapper);
+            QueryWrapper<ThirdConfig> thirdConfigQueryWrapper = new QueryWrapper<>();
+            thirdConfigQueryWrapper.eq("app_id", appId);
+            ThirdConfig config = thirdConfigService.getOne(thirdConfigQueryWrapper);
             if (Check.isNull(config)) {
                 throw new Exception("appId不正确");
             }
@@ -103,7 +103,7 @@ public class ThirdConfigController {
             thirtConfigAdvertiserQueryWrapper.eq("app_id", appId);
             thirtConfigAdvertiserQueryWrapper.eq("advertiser_name", advertiserName);
             thirtConfigAdvertiserQueryWrapper.last("limit 1");
-            ThirdConfigAdvertiser configAdvertiser = thirtConfigAdvertiserService.getOne(thirtConfigAdvertiserQueryWrapper);
+            ThirdConfigAdvertiser configAdvertiser = thirdConfigAdvertiserService.getOne(thirtConfigAdvertiserQueryWrapper);
             if (Check.isNull(configAdvertiser)) {
                 throw new Exception("此appId下暂无此广告主信息");
 
@@ -119,7 +119,7 @@ public class ThirdConfigController {
             }
 
 
-            List<JSONObject> costList = thirtConfigAdvertiserService.getAdvertiserCost(appId, advertiserName, startDate, endDate);
+            List<JSONObject> costList = thirdConfigAdvertiserService.getAdvertiserCost(appId, advertiserName, startDate, endDate);
             result.setResult(costList);
         } catch (Exception e) {
             result.setCode(-1);

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/third/server/impl/ThirdConfigAdvertiserServiceImpl.java

@@ -20,16 +20,16 @@ import java.util.List;
 @Service
 public class ThirdConfigAdvertiserServiceImpl extends ServiceImpl<ThirdConfigAdvertiserMapper, ThirdConfigAdvertiser> implements IThirdConfigAdvertiserService {
     @Autowired
-    private ThirdConfigAdvertiserMapper thirtConfigAdvertiserMapper;
+    private ThirdConfigAdvertiserMapper thirdConfigAdvertiserMapper;
 
 
     @Override
     public List<String> getAdvertiserListByAppId(Long appId) {
-        return thirtConfigAdvertiserMapper.getAdvertiserListByAppId(appId);
+        return thirdConfigAdvertiserMapper.getAdvertiserListByAppId(appId);
     }
 
     @Override
     public List<JSONObject> getAdvertiserCost(Long appId, String advertiserName, String startDate, String endDate) {
-        return thirtConfigAdvertiserMapper.getAdvertiserCost(appId, advertiserName, startDate, endDate);
+        return thirdConfigAdvertiserMapper.getAdvertiserCost(appId, advertiserName, startDate, endDate);
     }
 }

+ 0 - 134
jeecg-boot-module-system/src/main/java/org/jeecg/modules/thirt/controller/ThirtConfigController.java

@@ -1,134 +0,0 @@
-package org.jeecg.modules.thirt.controller;
-
-import cn.com.ctop.common.module.utils.Check;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import io.swagger.annotations.Api;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.modules.thirt.entity.ThirtConfig;
-import org.jeecg.modules.thirt.entity.ThirtConfigAdvertiser;
-import org.jeecg.modules.thirt.server.IThirtConfigAdvertiserService;
-import org.jeecg.modules.thirt.server.IThirtConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
- * 对外配置
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-08-14
- */
-@Slf4j
-@Api(tags = "对外配置")
-@RestController
-@RequestMapping("/thirt")
-public class ThirtConfigController {
-    @Autowired
-    private IThirtConfigService thirtConfigService;
-    @Autowired
-    private IThirtConfigAdvertiserService thirtConfigAdvertiserService;
-
-    @PostMapping(value = "/getAdvertiserList")
-    public Result<List<String>> getAdvertiserList(@RequestBody JSONObject requestJson) {
-
-        Result<List<String>> result = new Result<>();
-        try {
-            Long appId = requestJson.getLong("appId");
-            if (Check.isNull(appId)) {
-                throw new Exception("必传参数appId不能为空");
-            }
-            QueryWrapper<ThirtConfig> thirtConfigQueryWrapper = new QueryWrapper<>();
-            thirtConfigQueryWrapper.eq("app_id", appId);
-            ThirtConfig config = thirtConfigService.getOne(thirtConfigQueryWrapper);
-            if (Check.isNull(config)) {
-                throw new Exception("appId不正确");
-            }
-            String secret = requestJson.getString("secret");
-            if (Check.isNull(secret)) {
-                throw new Exception("secret不能为空");
-            }
-            if (!secret.equals(config.getSecret())) {
-                throw new Exception("secret不正确");
-            }
-
-            List<String> advertiserList = thirtConfigAdvertiserService.getAdvertiserListByAppId(appId);
-            result.setResult(advertiserList);
-
-        } catch (Exception e) {
-            result.setSuccess(false);
-            result.setMessage(e.getMessage());
-            result.setCode(-1);
-
-        }
-        return result;
-    }
-
-
-    @PostMapping(value = "/getAdvertiserCost")
-    public Result<List<JSONObject>> getAdvertiserCost(@RequestBody JSONObject requestJson) {
-        Result<List<JSONObject>> result = new Result<>();
-        try {
-
-            Long appId = requestJson.getLong("appId");
-            if (Check.isNull(appId)) {
-                throw new Exception("必传参数appId不能为空");
-            }
-            QueryWrapper<ThirtConfig> thirtConfigQueryWrapper = new QueryWrapper<>();
-            thirtConfigQueryWrapper.eq("app_id", appId);
-            ThirtConfig config = thirtConfigService.getOne(thirtConfigQueryWrapper);
-            if (Check.isNull(config)) {
-                throw new Exception("appId不正确");
-            }
-            String secret = requestJson.getString("secret");
-            if (Check.isNull(secret)) {
-                throw new Exception("secret不能为空");
-            }
-            if (!secret.equals(config.getSecret())) {
-                throw new Exception("secret不正确");
-            }
-
-            String advertiserName = requestJson.getString("advertiserName");
-            if (Check.isNull(advertiserName)) {
-                throw new Exception("请输入需要查询广告主名称");
-            }
-
-            QueryWrapper<ThirtConfigAdvertiser> thirtConfigAdvertiserQueryWrapper = new QueryWrapper<>();
-            thirtConfigAdvertiserQueryWrapper.eq("app_id", appId);
-            thirtConfigAdvertiserQueryWrapper.eq("advertiser_name", advertiserName);
-            thirtConfigAdvertiserQueryWrapper.last("limit 1");
-            ThirtConfigAdvertiser configAdvertiser = thirtConfigAdvertiserService.getOne(thirtConfigAdvertiserQueryWrapper);
-            if (Check.isNull(configAdvertiser)) {
-                throw new Exception("此appId下暂无此广告主信息");
-
-            }
-            String startDate = requestJson.getString("startDate");
-            if (Check.isNull(startDate)) {
-                throw new Exception("请输入查询开始时间");
-            }
-
-            String endDate = requestJson.getString("endDate");
-            if (Check.isNull(endDate)) {
-                throw new Exception("请输入查询结束时间");
-            }
-
-
-            List<JSONObject> costList = thirtConfigAdvertiserService.getAdvertiserCost(appId, advertiserName, startDate, endDate);
-            result.setResult(costList);
-        } catch (Exception e) {
-            result.setCode(-1);
-            result.setSuccess(false);
-            result.setMessage(e.getMessage());
-        }
-        return result;
-    }
-
-}

+ 0 - 57
jeecg-boot-module-system/src/main/java/org/jeecg/modules/thirt/entity/ThirtConfig.java

@@ -1,57 +0,0 @@
-package org.jeecg.modules.thirt.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.jeecgframework.poi.excel.annotation.Excel;
-
-import java.util.Date;
-
-/**
- * 对外配置
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-08-14
- */
-@Data
-@TableName("ctop_thirt_config")
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-@ApiModel(value = "ctop_thirt_config对象", description = "对外配置")
-public class ThirtConfig {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    @ApiModelProperty(value = "id")
-    private Long id;
-    /**
-     * appId
-     */
-    @Excel(name = "appId", width = 15)
-    @ApiModelProperty(value = "appId")
-    private Long appId;
-    /**
-     * secret
-     */
-    @Excel(name = "secret", width = 15)
-    @ApiModelProperty(value = "secret")
-    private String secret;
-    /**
-     * createTime
-     */
-    @ApiModelProperty(value = "createTime")
-    private Date createTime;
-    /**
-     * update
-     */
-    @ApiModelProperty(value = "update")
-    private Date updateTime;
-}

+ 0 - 57
jeecg-boot-module-system/src/main/java/org/jeecg/modules/thirt/entity/ThirtConfigAdvertiser.java

@@ -1,57 +0,0 @@
-package org.jeecg.modules.thirt.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.jeecgframework.poi.excel.annotation.Excel;
-
-import java.util.Date;
-
-/**
- * 对外配置关联广告主
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-08-14
- */
-@Data
-@TableName("ctop_thirt_config_advertiser")
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-@ApiModel(value = "ctop_thirt_config_advertiser对象", description = "对外配置关联广告主")
-public class ThirtConfigAdvertiser {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    @ApiModelProperty(value = "id")
-    private Long id;
-    /**
-     * appId
-     */
-    @Excel(name = "appId", width = 15)
-    @ApiModelProperty(value = "appId")
-    private Integer appId;
-    /**
-     * advertsierName
-     */
-    @Excel(name = "advertsierName", width = 15)
-    @ApiModelProperty(value = "advertiserName")
-    private String advertiserName;
-    /**
-     * createTime
-     */
-    @ApiModelProperty(value = "createTime")
-    private Date createTime;
-    /**
-     * update
-     */
-    @ApiModelProperty(value = "update")
-    private Date updateTime;
-}

+ 0 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/thirt/server/IThirtConfigService.java

@@ -1,14 +0,0 @@
-package org.jeecg.modules.thirt.server;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.jeecg.modules.thirt.entity.ThirtConfig;
-
-/**
- * @Description: 对外配置
- * @Author: jeecg-boot
- * @Date: 2020-08-14
- * @Version: V1.0
- */
-public interface IThirtConfigService extends IService<ThirtConfig> {
-
-}