Browse Source

Google java format

wfansh 2 months ago
parent
commit
8d8c89b9f0
17 changed files with 358 additions and 363 deletions
  1. 40 42
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/controller/SubscribePlanController.java
  2. 5 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/service/impl/SubscribePlanServiceImpl.java
  3. 33 23
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/controller/SystemAdwebController.java
  4. 6 3
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/IMasterSubAccountRelationService.java
  5. 2 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/ISysExceptionService.java
  6. 2 7
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/SysAdwebApi.java
  7. 15 7
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/MasterSubAccountRelationServiceImpl.java
  8. 19 24
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysAdwebApiImpl.java
  9. 3 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysExceptionServiceImpl.java
  10. 136 135
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/theme/controller/AdwebThemeController.java
  11. 78 84
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/controller/AdwebUserCountryController.java
  12. 0 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/DistributeCountryParam.java
  13. 1 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/SubUser.java
  14. 1 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/TreeOption.java
  15. 3 3
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/IAdwebUserCountryService.java
  16. 3 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/impl/AdwebCountryServiceImpl.java
  17. 11 10
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/impl/AdwebUserCountryServiceImpl.java

+ 40 - 42
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/controller/SubscribePlanController.java

@@ -36,11 +36,10 @@ import java.util.List;
 @RequestMapping("/adweb/subscribePlan")
 @Slf4j
 public class SubscribePlanController extends JeecgController<SubscribePlan, ISubscribePlanService> {
-    @Autowired
-    private ISubscribePlanService seoMarketPlanService;
+    @Autowired private ISubscribePlanService seoMarketPlanService;
 
-//    @Autowired
-//	private IAdwebMaterialCheckService checkService;
+    //    @Autowired
+    //	private IAdwebMaterialCheckService checkService;
 
     /**
      * 分页列表查询
@@ -51,14 +50,16 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
      * @param req
      * @return
      */
-    //@AutoLog(value = "网站营销方案套餐表-分页列表查询")
+    // @AutoLog(value = "网站营销方案套餐表-分页列表查询")
     @Operation(summary = "网站营销方案套餐表-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<IPage<SubscribePlan>> queryPageList(SubscribePlan subscribePlan,
-                                                      @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                      HttpServletRequest req) {
-        QueryWrapper<SubscribePlan> queryWrapper = QueryGenerator.initQueryWrapper(subscribePlan, req.getParameterMap());
+    public Result<IPage<SubscribePlan>> queryPageList(
+            SubscribePlan subscribePlan,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            HttpServletRequest req) {
+        QueryWrapper<SubscribePlan> queryWrapper =
+                QueryGenerator.initQueryWrapper(subscribePlan, req.getParameterMap());
         Page<SubscribePlan> page = new Page<SubscribePlan>(pageNo, pageSize);
         IPage<SubscribePlan> pageList = seoMarketPlanService.page(page, queryWrapper);
         return Result.OK(pageList);
@@ -104,7 +105,9 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
     @AutoLog(value = "网站营销方案套餐表-编辑")
     @Operation(summary = "网站营销方案套餐表-编辑")
     @PreAuthorize("@jps.requiresPermissions('adweb:seo_market_plan:edit')")
-    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    @RequestMapping(
+            value = "/edit",
+            method = {RequestMethod.PUT, RequestMethod.POST})
     public Result<String> edit(@RequestBody SubscribePlan subscribePlan) {
         seoMarketPlanService.updateById(subscribePlan);
         return Result.OK("编辑成功!");
@@ -146,7 +149,7 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
      * @param id
      * @return
      */
-    //@AutoLog(value = "网站营销方案套餐表-通过id查询")
+    // @AutoLog(value = "网站营销方案套餐表-通过id查询")
     @Operation(summary = "网站营销方案套餐表-通过id查询")
     @GetMapping(value = "/queryById")
     public Result<SubscribePlan> queryById(@RequestParam(name = "id", required = true) String id) {
@@ -182,12 +185,7 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
         return super.importExcel(request, response, SubscribePlan.class);
     }
 
-    /**
-     * 获取随机字符串作为planCode
-     *
-     * @Author: luxiaoxiao
-     * @Date: 2021/11/16
-     */
+    /** 获取随机字符串作为planCode @Author: luxiaoxiao @Date: 2021/11/16 */
     private String getPlanCode() {
         String planCode = RandomUtil.randomStringUpper(4);
         planCode = planCode.toUpperCase();
@@ -197,29 +195,29 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
         return count > 0 ? getPlanCode() : planCode;
     }
 
-//	/**
-//	 * 物料完整性检测模板设置
-//	 *
-//	 * @Author:yangjingwen
-//	 * @Date:2022/5/7
-//	 */
-//	@GetMapping(value="/integrityChecking")
-//	public Result<?> integrityChecking(String planId){
-//		QueryWrapper<AdwebMaterialCheck> queryWrapper=new QueryWrapper<>();
-//		queryWrapper.eq("plan_id",planId).orderByAsc("sort");
-//		List<AdwebMaterialCheck> checkList = checkService.list(queryWrapper);
-//		if(!checkList.isEmpty()){
-//			return Result.OK(checkList);
-//		}
-//		//查出模板数据
-//		QueryWrapper<AdwebMaterialCheck> queryWrapper1 = new QueryWrapper<>();
-//		queryWrapper1.isNull("plan_id").orderByAsc("sort");
-//		List<AdwebMaterialCheck> checkTemplateList = checkService.list(queryWrapper1);
-//		checkTemplateList.forEach(check -> {
-//			check.setPlanId(planId);
-//		});
-//		checkService.saveBatch(checkTemplateList);
-//		return Result.OK(checkTemplateList);
-//	}
+    //	/**
+    //	 * 物料完整性检测模板设置
+    //	 *
+    //	 * @Author:yangjingwen
+    //	 * @Date:2022/5/7
+    //	 */
+    //	@GetMapping(value="/integrityChecking")
+    //	public Result<?> integrityChecking(String planId){
+    //		QueryWrapper<AdwebMaterialCheck> queryWrapper=new QueryWrapper<>();
+    //		queryWrapper.eq("plan_id",planId).orderByAsc("sort");
+    //		List<AdwebMaterialCheck> checkList = checkService.list(queryWrapper);
+    //		if(!checkList.isEmpty()){
+    //			return Result.OK(checkList);
+    //		}
+    //		//查出模板数据
+    //		QueryWrapper<AdwebMaterialCheck> queryWrapper1 = new QueryWrapper<>();
+    //		queryWrapper1.isNull("plan_id").orderByAsc("sort");
+    //		List<AdwebMaterialCheck> checkTemplateList = checkService.list(queryWrapper1);
+    //		checkTemplateList.forEach(check -> {
+    //			check.setPlanId(planId);
+    //		});
+    //		checkService.saveBatch(checkTemplateList);
+    //		return Result.OK(checkTemplateList);
+    //	}
 
 }

+ 5 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/service/impl/SubscribePlanServiceImpl.java

@@ -1,20 +1,21 @@
 package org.jeecg.modules.adweb.subscribePlan.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
 import org.jeecg.modules.adweb.subscribePlan.entity.SubscribePlan;
 import org.jeecg.modules.adweb.subscribePlan.mapper.SubscribePlanMapper;
 import org.jeecg.modules.adweb.subscribePlan.service.ISubscribePlanService;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 /**
  * @Description: 网站营销方案套餐表
  * @Author: jeecg-boot
- * @Date:   2024-09-27
+ * @Date: 2024-09-27
  * @Version: V1.0
  */
 @Service
-public class SubscribePlanServiceImpl extends ServiceImpl<SubscribePlanMapper, SubscribePlan> implements ISubscribePlanService {
+public class SubscribePlanServiceImpl extends ServiceImpl<SubscribePlanMapper, SubscribePlan>
+        implements ISubscribePlanService {
 
     @Override
     public SubscribePlan getSubscribePlanBySiteId(Integer siteId) {

+ 33 - 23
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/controller/SystemAdwebController.java

@@ -1,10 +1,14 @@
 package org.jeecg.modules.adweb.system.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+
 import io.swagger.v3.oas.annotations.tags.Tag;
+
 import jakarta.annotation.PostConstruct;
 import jakarta.annotation.Resource;
+
 import lombok.extern.slf4j.Slf4j;
+
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.adweb.common.jedis.ObjectUtil;
 import org.jeecg.modules.adweb.common.util.JedisUtil;
@@ -38,23 +42,17 @@ import java.util.stream.Collectors;
 @Slf4j
 public class SystemAdwebController {
 
-    @Resource
-    private SysAdwebApi sysAdwebApi;
+    @Resource private SysAdwebApi sysAdwebApi;
 
-    @Resource
-    private ISysUserService iSysUserService;
+    @Resource private ISysUserService iSysUserService;
 
-    @Resource
-    private ISysRoleService iSysRoleService;
+    @Resource private ISysRoleService iSysRoleService;
 
-    @Resource
-    private ISysUserRoleService iSysUserRoleService;
+    @Resource private ISysUserRoleService iSysUserRoleService;
 
-    @Resource
-    private EnquiryRedisService enquiryRedisService;
+    @Resource private EnquiryRedisService enquiryRedisService;
 
-    @Resource
-    private IEnquiryEmailMessageService enquiryEmailMessageService;
+    @Resource private IEnquiryEmailMessageService enquiryEmailMessageService;
 
     private static final byte[] redisKey = EnquiryConstants.ENQUIRY_EMAIL.getBytes();
 
@@ -68,20 +66,31 @@ public class SystemAdwebController {
         List<SysUser> userList = null;
         // 只针对admin 获取 渠道商列表
         if (sysAdwebApi.isAdmin()) {
-            //获取role表里角色编码为adweb_oem的角色的id
-            List<SysRole> sysRoleList = iSysRoleService.list(new LambdaQueryWrapper<SysRole>().eq(SysRole::getRoleCode, "adweb_oem"));
+            // 获取role表里角色编码为adweb_oem的角色的id
+            List<SysRole> sysRoleList =
+                    iSysRoleService.list(
+                            new LambdaQueryWrapper<SysRole>()
+                                    .eq(SysRole::getRoleCode, "adweb_oem"));
             if (sysRoleList.isEmpty()) {
                 return Result.error("获取渠道商列表失败");
             }
             SysRole role = sysRoleList.get(0);
-            //根据adweb_oem的角色的id去查user_role中间表中所有为此角色id的user_id
-            List<SysUserRole> sysUserRoleList = iSysUserRoleService.list(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getRoleId, role.getId()));
+            // 根据adweb_oem的角色的id去查user_role中间表中所有为此角色id的user_id
+            List<SysUserRole> sysUserRoleList =
+                    iSysUserRoleService.list(
+                            new LambdaQueryWrapper<SysUserRole>()
+                                    .eq(SysUserRole::getRoleId, role.getId()));
             if (sysUserRoleList.isEmpty()) {
                 return Result.error("获取渠道商列表失败");
             }
-            List<String> userIdList = sysUserRoleList.stream().map(SysUserRole::getUserId).collect(Collectors.toList());
-            //查询user表中所有上面查询出的user_id的数据
-            userList = iSysUserService.list(new LambdaQueryWrapper<SysUser>().in(SysUser::getId, userIdList));
+            List<String> userIdList =
+                    sysUserRoleList.stream()
+                            .map(SysUserRole::getUserId)
+                            .collect(Collectors.toList());
+            // 查询user表中所有上面查询出的user_id的数据
+            userList =
+                    iSysUserService.list(
+                            new LambdaQueryWrapper<SysUser>().in(SysUser::getId, userIdList));
         }
         return Result.OK(userList);
     }
@@ -89,7 +98,8 @@ public class SystemAdwebController {
     @PostConstruct
     public void startEnquiryRedisListener() {
         enquiryRedisService.init();
-        enquiryRedisService.startEnquiryEmailMessageListener(EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, enquiryEmailMessageService);
+        enquiryRedisService.startEnquiryEmailMessageListener(
+                EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, enquiryEmailMessageService);
     }
 
     /**
@@ -101,14 +111,14 @@ public class SystemAdwebController {
     public Result<?> testSendEmail() {
         try {
             JedisUtil.lpush(redisKey, ObjectUtil.object2Bytes(1311742895508602880L));
-            JedisUtil.publishMsg(EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, EnquiryConstants.ENQUIRY_EMAIL);
+            JedisUtil.publishMsg(
+                    EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, EnquiryConstants.ENQUIRY_EMAIL);
         } catch (IOException e) {
             log.info("测试发送监听发送邮件的消息失败");
         }
 
-//        enquiryEmailMessageService.sendEnquiryEmail(1311742895508602880L);
+        //        enquiryEmailMessageService.sendEnquiryEmail(1311742895508602880L);
 
         return Result.OK("");
     }
-
 }

+ 6 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/IMasterSubAccountRelationService.java

@@ -1,16 +1,16 @@
 package org.jeecg.modules.adweb.system.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+
 import org.jeecg.modules.adweb.system.entity.MasterSubAccountRelation;
 
 import java.util.List;
 
-/**
- * “Adweb会员”主账户和子账户对应关系
- */
+/** “Adweb会员”主账户和子账户对应关系 */
 public interface IMasterSubAccountRelationService extends IService<MasterSubAccountRelation> {
     /**
      * 通过子账户ID获取主账户ID
+     *
      * @param subId
      * @return
      */
@@ -18,6 +18,7 @@ public interface IMasterSubAccountRelationService extends IService<MasterSubAcco
 
     /**
      * 通过子账户ID获取主账户名
+     *
      * @param subId
      * @return
      */
@@ -25,6 +26,7 @@ public interface IMasterSubAccountRelationService extends IService<MasterSubAcco
 
     /**
      * 通过主账户ID获取子账户ID
+     *
      * @param masterId
      * @return
      */
@@ -32,6 +34,7 @@ public interface IMasterSubAccountRelationService extends IService<MasterSubAcco
 
     /**
      * 保存主账户和子账户ID
+     *
      * @param relation
      */
     void insertAccountRelation(MasterSubAccountRelation relation);

+ 2 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/ISysExceptionService.java

@@ -6,9 +6,7 @@ import org.jeecg.modules.adweb.system.entity.SysException;
 /**
  * @Description: sys_exception
  * @Author: jeecg-boot
- * @Date:   2023-01-13
+ * @Date: 2023-01-13
  * @Version: V1.0
  */
-public interface ISysExceptionService extends IService<SysException> {
-
-}
+public interface ISysExceptionService extends IService<SysException> {}

+ 2 - 7
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/SysAdwebApi.java

@@ -30,15 +30,10 @@ public interface SysAdwebApi {
      */
     boolean isNotOwnSite(String siteCode);
 
-
-    /**
-     * 判断一个用户是否是adweb会员
-     */
+    /** 判断一个用户是否是adweb会员 */
     boolean isAdwebVip();
 
-    /**
-     * 判断一个用户是否是adweb子会员
-     */
+    /** 判断一个用户是否是adweb子会员 */
     boolean isAdwebSubVip();
 
     /**

+ 15 - 7
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/MasterSubAccountRelationServiceImpl.java

@@ -2,8 +2,11 @@ package org.jeecg.modules.adweb.system.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
 import jakarta.annotation.Resource;
+
 import lombok.extern.slf4j.Slf4j;
+
 import org.apache.commons.collections4.CollectionUtils;
 import org.jeecg.modules.adweb.system.entity.MasterSubAccountRelation;
 import org.jeecg.modules.adweb.system.mapper.MasterSubAccountRelationMapper;
@@ -19,11 +22,11 @@ import java.util.stream.Collectors;
 
 @Service
 @Slf4j
-public class MasterSubAccountRelationServiceImpl extends ServiceImpl<MasterSubAccountRelationMapper, MasterSubAccountRelation> implements IMasterSubAccountRelationService {
+public class MasterSubAccountRelationServiceImpl
+        extends ServiceImpl<MasterSubAccountRelationMapper, MasterSubAccountRelation>
+        implements IMasterSubAccountRelationService {
 
-    @Lazy
-    @Resource
-    private SysAdwebApi sysAdwebApi;
+    @Lazy @Resource private SysAdwebApi sysAdwebApi;
 
     @Override
     public String getMasterAccountIdBySub(String subId) {
@@ -73,7 +76,10 @@ public class MasterSubAccountRelationServiceImpl extends ServiceImpl<MasterSubAc
         } catch (Exception e) {
             log.error("通过主账户ID获取子账户ID失败");
         }
-        subIdList = relationList.stream().map(MasterSubAccountRelation::getSubId).collect(Collectors.toList());
+        subIdList =
+                relationList.stream()
+                        .map(MasterSubAccountRelation::getSubId)
+                        .collect(Collectors.toList());
         return subIdList;
     }
 
@@ -118,9 +124,11 @@ public class MasterSubAccountRelationServiceImpl extends ServiceImpl<MasterSubAc
         if (CollectionUtils.isEmpty(relations)) {
             return defaultList;
         }
-        List<String> uidList = relations.stream().map(MasterSubAccountRelation::getSubId).collect(Collectors.toList());
+        List<String> uidList =
+                relations.stream()
+                        .map(MasterSubAccountRelation::getSubId)
+                        .collect(Collectors.toList());
         uidList.add(masterId);
         return uidList;
     }
-
 }

+ 19 - 24
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysAdwebApiImpl.java

@@ -2,8 +2,11 @@ package org.jeecg.modules.adweb.system.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xkcoding.http.util.StringUtil;
+
 import jakarta.annotation.Resource;
+
 import lombok.extern.slf4j.Slf4j;
+
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.system.api.ISysBaseAPI;
@@ -32,35 +35,27 @@ import java.util.List;
 @Slf4j
 @Service
 public class SysAdwebApiImpl implements SysAdwebApi {
-    @Resource
-    private SysUserRoleMapper sysUserRoleMapper;
+    @Resource private SysUserRoleMapper sysUserRoleMapper;
 
-    @Resource
-    private SysUserMapper userMapper;
+    @Resource private SysUserMapper userMapper;
 
-    @Resource
-    private SysDictItemMapper sysDictItemMapper;
+    @Resource private SysDictItemMapper sysDictItemMapper;
 
-    @Autowired
-    private ISiteUserPermissionService siteUserPermissionService;
+    @Autowired private ISiteUserPermissionService siteUserPermissionService;
 
-    @Autowired
-    private IAdwebSiteService adwebSiteService;
+    @Autowired private IAdwebSiteService adwebSiteService;
 
-    @Autowired
-    private ISysBaseAPI sysBaseAPI;
+    @Autowired private ISysBaseAPI sysBaseAPI;
 
-    @Autowired
-    private ISysDictService sysDictService;
+    @Autowired private ISysDictService sysDictService;
 
-    @Autowired
-    private ISysUserTenantService sysUserTenantService;
+    @Autowired private ISysUserTenantService sysUserTenantService;
 
     @Override
     public boolean isAdmin() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         String username = sysUser.getUsername();
-        List<String> adminRoleIdList = new ArrayList<>();    // 管理员角色id列表
+        List<String> adminRoleIdList = new ArrayList<>(); // 管理员角色id列表
         adminRoleIdList.add("admin");
         adminRoleIdList.add("adweb_admin");
         adminRoleIdList.add("seo_admin");
@@ -79,8 +74,8 @@ public class SysAdwebApiImpl implements SysAdwebApi {
     public boolean isChannelAdmin() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         String username = sysUser.getUsername();
-//        List<String> adminRoleIdList = new ArrayList<>();    // 管理员角色id列表
-//        adminRoleIdList.add("adweb_oem");
+        //        List<String> adminRoleIdList = new ArrayList<>();    // 管理员角色id列表
+        //        adminRoleIdList.add("adweb_oem");
         List<String> roles = sysUserRoleMapper.getRoleByUserName(username);
         for (String role : roles) {
             if ("adweb_channel_admin".equals(role)) {
@@ -123,7 +118,8 @@ public class SysAdwebApiImpl implements SysAdwebApi {
 
         if (this.isChannelAdmin()) {
             List<String> channelGroupUids = this.getChannelGroupUids();
-            List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
+            List<String> codeList =
+                    siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!this.isAdmin()) {
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -155,7 +151,8 @@ public class SysAdwebApiImpl implements SysAdwebApi {
 
         if (this.isChannelAdmin()) {
             List<String> channelGroupUids = this.getChannelGroupUids();
-            List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
+            List<String> codeList =
+                    siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!this.isAdmin()) {
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -171,9 +168,7 @@ public class SysAdwebApiImpl implements SysAdwebApi {
         return true;
     }
 
-    /**
-     * 判断一个用户是否是adweb会员
-     */
+    /** 判断一个用户是否是adweb会员 */
     @Override
     public boolean isAdwebVip() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();

+ 3 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysExceptionServiceImpl.java

@@ -9,10 +9,9 @@ import org.springframework.stereotype.Service;
 /**
  * @Description: sys_exception
  * @Author: jeecg-boot
- * @Date:   2023-01-13
+ * @Date: 2023-01-13
  * @Version: V1.0
  */
 @Service
-public class SysExceptionServiceImpl extends ServiceImpl<SysExceptionMapper, SysException> implements ISysExceptionService {
-
-}
+public class SysExceptionServiceImpl extends ServiceImpl<SysExceptionMapper, SysException>
+        implements ISysExceptionService {}

+ 136 - 135
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/theme/controller/AdwebThemeController.java

@@ -1,148 +1,152 @@
 package org.jeecg.modules.adweb.theme.controller;
 
-import java.util.Arrays;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
 
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.modules.adweb.theme.entity.AdwebTheme;
-import org.jeecg.modules.adweb.theme.service.IAdwebThemeService;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.adweb.theme.entity.AdwebTheme;
+import org.jeecg.modules.adweb.theme.service.IAdwebThemeService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.jeecg.common.aspect.annotation.AutoLog;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.jeecg.modules.adweb.theme.dto.AdwebTemplateTagDto;
 
- /**
+import java.util.Arrays;
+
+/**
  * @Description: adweb主题库
  * @Author: jeecg-boot
- * @Date:   2024-09-30
+ * @Date: 2024-09-30
  * @Version: V1.0
  */
-@Tag(name="adweb主题库")
+@Tag(name = "adweb主题库")
 @RestController
 @RequestMapping("/adweb/adwebTheme")
 @Slf4j
 public class AdwebThemeController extends JeecgController<AdwebTheme, IAdwebThemeService> {
-	@Autowired
-	private IAdwebThemeService adwebThemeService;
-	
-	/**
-	 * 分页列表查询
-	 *
-	 * @param adwebTheme
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	//@AutoLog(value = "adweb主题库-分页列表查询")
-	@Operation(summary="adweb主题库-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<AdwebTheme>> queryPageList(AdwebTheme adwebTheme,
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-								   HttpServletRequest req) {
-		QueryWrapper<AdwebTheme> queryWrapper = QueryGenerator.initQueryWrapper(adwebTheme, req.getParameterMap());
-		Page<AdwebTheme> page = new Page<AdwebTheme>(pageNo, pageSize);
-		IPage<AdwebTheme> pageList = adwebThemeService.page(page, queryWrapper);
-		return Result.OK(pageList);
-	}
-	
-	/**
-	 *   添加
-	 *
-	 * @param adwebTheme
-	 * @return
-	 */
-	@AutoLog(value = "adweb主题库-添加")
-	@Operation(summary="adweb主题库-添加")
-	@PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:add')")
-	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody AdwebTheme adwebTheme) {
-		adwebThemeService.save(adwebTheme);
-		return Result.OK("添加成功!");
-	}
-	
-	/**
-	 *  编辑
-	 *
-	 * @param adwebTheme
-	 * @return
-	 */
-	@AutoLog(value = "adweb主题库-编辑")
-	@Operation(summary="adweb主题库-编辑")
+    @Autowired private IAdwebThemeService adwebThemeService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param adwebTheme
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    // @AutoLog(value = "adweb主题库-分页列表查询")
+    @Operation(summary = "adweb主题库-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<AdwebTheme>> queryPageList(
+            AdwebTheme adwebTheme,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            HttpServletRequest req) {
+        QueryWrapper<AdwebTheme> queryWrapper =
+                QueryGenerator.initQueryWrapper(adwebTheme, req.getParameterMap());
+        Page<AdwebTheme> page = new Page<AdwebTheme>(pageNo, pageSize);
+        IPage<AdwebTheme> pageList = adwebThemeService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param adwebTheme
+     * @return
+     */
+    @AutoLog(value = "adweb主题库-添加")
+    @Operation(summary = "adweb主题库-添加")
+    @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:add')")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody AdwebTheme adwebTheme) {
+        adwebThemeService.save(adwebTheme);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param adwebTheme
+     * @return
+     */
+    @AutoLog(value = "adweb主题库-编辑")
+    @Operation(summary = "adweb主题库-编辑")
     @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:edit')")
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody AdwebTheme adwebTheme) {
-		adwebThemeService.updateById(adwebTheme);
-		return Result.OK("编辑成功!");
-	}
-	
-	/**
-	 *   通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "adweb主题库-通过id删除")
-	@Operation(summary="adweb主题库-通过id删除")
+    @RequestMapping(
+            value = "/edit",
+            method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody AdwebTheme adwebTheme) {
+        adwebThemeService.updateById(adwebTheme);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "adweb主题库-通过id删除")
+    @Operation(summary = "adweb主题库-通过id删除")
     @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:delete')")
-	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-		adwebThemeService.removeById(id);
-		return Result.OK("删除成功!");
-	}
-	
-	/**
-	 *  批量删除
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "adweb主题库-批量删除")
-	@Operation(summary="adweb主题库-批量删除")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        adwebThemeService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "adweb主题库-批量删除")
+    @Operation(summary = "adweb主题库-批量删除")
     @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:deleteBatch')")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		this.adwebThemeService.removeByIds(Arrays.asList(ids.split(",")));
-		return Result.OK("批量删除成功!");
-	}
-	
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "adweb主题库-通过id查询")
-	@Operation(summary="adweb主题库-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<AdwebTheme> queryById(@RequestParam(name="id",required=true) String id) {
-		AdwebTheme adwebTheme = adwebThemeService.getById(id);
-		if(adwebTheme==null) {
-			return Result.error("未找到对应数据");
-		}
-		return Result.OK(adwebTheme);
-	}
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.adwebThemeService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    // @AutoLog(value = "adweb主题库-通过id查询")
+    @Operation(summary = "adweb主题库-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<AdwebTheme> queryById(@RequestParam(name = "id", required = true) String id) {
+        AdwebTheme adwebTheme = adwebThemeService.getById(id);
+        if (adwebTheme == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(adwebTheme);
+    }
 
     /**
-    * 导出excel
-    *
-    * @param request
-    * @param adwebTheme
-    */
+     * 导出excel
+     *
+     * @param request
+     * @param adwebTheme
+     */
     @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:exportXls')")
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, AdwebTheme adwebTheme) {
@@ -150,27 +154,24 @@ public class AdwebThemeController extends JeecgController<AdwebTheme, IAdwebThem
     }
 
     /**
-      * 通过excel导入数据
-    *
-    * @param request
-    * @param response
-    * @return
-    */
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
     @PreAuthorize("@jps.requiresPermissions('adweb:adweb_theme:importExcel')")
     @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
         return super.importExcel(request, response, AdwebTheme.class);
     }
 
-	 /**
-	  *
-	  * @return
-	  */
-	 @GetMapping(value = "/getTemplateTags")
-	 public Result<?> getTemplateTags() {
-
-
-		 return Result.OK("");
-	 }
+    /**
+     * @return
+     */
+    @GetMapping(value = "/getTemplateTags")
+    public Result<?> getTemplateTags() {
 
+        return Result.OK("");
+    }
 }

+ 78 - 84
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/controller/AdwebUserCountryController.java

@@ -6,13 +6,16 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
+
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
-import kotlin.jvm.internal.Lambda;
+
 import lombok.extern.slf4j.Slf4j;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
@@ -52,29 +55,22 @@ import java.util.stream.Collectors;
 @RestController
 @RequestMapping("/usercountry")
 @Slf4j
-public class AdwebUserCountryController extends JeecgController<AdwebUserCountry, IAdwebUserCountryService> {
+public class AdwebUserCountryController
+        extends JeecgController<AdwebUserCountry, IAdwebUserCountryService> {
 
-    @Resource
-    private IAdwebUserCountryService adwebUserCountryService;
+    @Resource private IAdwebUserCountryService adwebUserCountryService;
 
-    @Resource
-    private IAdwebSiteService adwebSiteService;
+    @Resource private IAdwebSiteService adwebSiteService;
 
-    @Resource
-    private AdwebUserCountryMapper adwebUserCountryMapper;
+    @Resource private AdwebUserCountryMapper adwebUserCountryMapper;
 
-    @Resource
-    private IAdwebCountryService admpCountryService;
+    @Resource private IAdwebCountryService admpCountryService;
 
-    @Resource
-    private IAdwebEnquiryService adwebEnquiryService;
+    @Resource private IAdwebEnquiryService adwebEnquiryService;
 
-    @Resource
-    private SysAdwebApi sysAdwebApi;
-
-    @Resource
-    private ISysUserService sysUserService;
+    @Resource private SysAdwebApi sysAdwebApi;
 
+    @Resource private ISysUserService sysUserService;
 
     /**
      * 分页列表查询
@@ -88,19 +84,19 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
     @AutoLog(value = "adweb_user_country-分页列表查询")
     @Operation(summary = "adweb_user_country-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<?> queryPageList(AdwebUserCountry adwebUserCountry,
-                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                   HttpServletRequest req) {
-        QueryWrapper<AdwebUserCountry> queryWrapper = QueryGenerator.initQueryWrapper(adwebUserCountry, req.getParameterMap());
+    public Result<?> queryPageList(
+            AdwebUserCountry adwebUserCountry,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            HttpServletRequest req) {
+        QueryWrapper<AdwebUserCountry> queryWrapper =
+                QueryGenerator.initQueryWrapper(adwebUserCountry, req.getParameterMap());
         Page<AdwebUserCountry> page = new Page<AdwebUserCountry>(pageNo, pageSize);
         IPage<AdwebUserCountry> pageList = adwebUserCountryService.page(page, queryWrapper);
         return Result.OK(pageList);
     }
 
-    /**
-     * 查询未分配地区
-     */
+    /** 查询未分配地区 */
     @GetMapping(value = "/undistribute")
     public Result<?> undistribute() {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -109,24 +105,23 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         queryWrapper.eq(AdwebUserCountry::getStatus, 1);
         List<AdwebUserCountry> userCountries = adwebUserCountryService.list(queryWrapper);
         List<AdwebCountry> countries = null;
-        if (CollectionUtils.isEmpty(userCountries)) {
+        if (CollectionUtils.isEmpty(userCountries)) {}
 
-        }
         return Result.OK();
     }
 
-    /**
-     * 获取子账户列表
-     */
+    /** 获取子账户列表 */
     @AutoLog(value = "询盘管理-询盘分配-子账户列表")
     @GetMapping(value = "/subAccounts")
-    public Result<?> subAccounts(@RequestParam(name = "siteId") Integer siteId,
-                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                 @RequestParam(name = "pageSize", defaultValue = "15") Integer pageSize) {
+    public Result<?> subAccounts(
+            @RequestParam(name = "siteId") Integer siteId,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "15") Integer pageSize) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         List<Integer> siteIds = adwebSiteService.getAllSiteIdByParentId(siteId);
         Page<SubUser> page = new Page<>(pageNo, pageSize);
-        IPage<SubUser> pageList = adwebUserCountryMapper.getSubUserList(page, loginUser.getId(), siteIds);
+        IPage<SubUser> pageList =
+                adwebUserCountryMapper.getSubUserList(page, loginUser.getId(), siteIds);
         LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new LambdaQueryWrapper<>();
         enquiryQueryWrapper.eq(AdwebEnquiry::getStatus, 1);
         enquiryQueryWrapper.in(AdwebEnquiry::getSiteId, siteIds);
@@ -143,9 +138,7 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK(pageList);
     }
 
-    /**
-     * 获取子账户列表
-     */
+    /** 获取子账户列表 */
     @GetMapping(value = "/subAccounts/options")
     public Result<?> subAccounts2(Integer siteId, String siteCode) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -156,7 +149,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
             if (siteId != null) {
                 site = adwebSiteService.getById(siteId);
             } else {
-                site = adwebSiteService.getOne(new LambdaQueryWrapper<AdwebSite>().eq(AdwebSite::getCode, siteCode));
+                site =
+                        adwebSiteService.getOne(
+                                new LambdaQueryWrapper<AdwebSite>()
+                                        .eq(AdwebSite::getCode, siteCode));
             }
             if (site == null) {
                 return Result.OK(new ArrayList<SubUser>());
@@ -183,16 +179,15 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK(list);
     }
 
-    /**
-     * 获取子账户负责的国家
-     */
+    /** 获取子账户负责的国家 */
     @GetMapping(value = "/country/charge")
     public Result<?> chargeCountry(@RequestParam String id, @RequestParam Integer siteId) {
         LambdaQueryWrapper<AdwebUserCountry> userCountryQueryWrapper = new LambdaQueryWrapper<>();
         userCountryQueryWrapper.eq(AdwebUserCountry::getUid, id);
         userCountryQueryWrapper.eq(AdwebUserCountry::getSiteId, siteId);
         userCountryQueryWrapper.eq(AdwebUserCountry::getStatus, 1);
-        List<AdwebUserCountry> userCountries = adwebUserCountryService.list(userCountryQueryWrapper);
+        List<AdwebUserCountry> userCountries =
+                adwebUserCountryService.list(userCountryQueryWrapper);
         if (CollectionUtils.isEmpty(userCountries)) {
             return Result.OK();
         }
@@ -213,7 +208,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         Map<String, List<AdwebCountry>> map = new HashMap<>();
         for (AdwebCountry country : countries) {
             String continentCode = country.getContinentCode();
-            List<AdwebCountry> countryList = map.computeIfAbsent(continentCode, k -> new ArrayList<>());
+            List<AdwebCountry> countryList =
+                    map.computeIfAbsent(continentCode, k -> new ArrayList<>());
             countryList.add(country);
         }
 
@@ -238,9 +234,7 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK(options);
     }
 
-    /**
-     * 获取未分配的国家
-     */
+    /** 获取未分配的国家 */
     @GetMapping(value = "/country/uncontribute")
     public Result<?> uncontributeCountry(Integer siteId) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -248,7 +242,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         userCountryQueryWrapper.eq(AdwebUserCountry::getMasterUid, loginUser.getId());
         userCountryQueryWrapper.eq(AdwebUserCountry::getStatus, 1);
         userCountryQueryWrapper.eq(AdwebUserCountry::getSiteId, siteId);
-        List<AdwebUserCountry> userCountries = adwebUserCountryService.list(userCountryQueryWrapper);
+        List<AdwebUserCountry> userCountries =
+                adwebUserCountryService.list(userCountryQueryWrapper);
 
         List<AdwebCountry> countries;
         if (CollectionUtils.isEmpty(userCountries)) {
@@ -271,7 +266,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         Map<String, List<AdwebCountry>> map = new HashMap<>();
         for (AdwebCountry country : countries) {
             String continentCode = country.getContinentCode();
-            List<AdwebCountry> countryList = map.computeIfAbsent(continentCode, k -> new ArrayList<>());
+            List<AdwebCountry> countryList =
+                    map.computeIfAbsent(continentCode, k -> new ArrayList<>());
             countryList.add(country);
         }
 
@@ -296,15 +292,13 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK(options);
     }
 
-    /**
-     * 分配国家
-     */
+    /** 分配国家 */
     @PostMapping(value = "/contribute/add")
     public Result<?> contributeCountry(@RequestBody DistributeCountryParam param) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        if(sysUser.isPerform()){
-//            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
-//        }
+        //        if(sysUser.isPerform()){
+        //            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
+        //        }
         String uid = param.getUid();
         String countryIds = param.getCountryIds();
         String[] countryIdArr = countryIds.split(",");
@@ -329,7 +323,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         LambdaQueryWrapper<AdwebCountry> countryQueryWrapper = new LambdaQueryWrapper<>();
         countryQueryWrapper.in(AdwebCountry::getGeonameId, countryIdArr);
         List<AdwebCountry> countries = admpCountryService.list(countryQueryWrapper);
-        List<String> countryCodes = countries.stream().map(AdwebCountry::getCountryIsoCode).collect(Collectors.toList());
+        List<String> countryCodes =
+                countries.stream()
+                        .map(AdwebCountry::getCountryIsoCode)
+                        .collect(Collectors.toList());
 
         List<Integer> siteIds = adwebSiteService.getAllSiteIdByParentId(param.getSiteId());
         LambdaUpdateWrapper<AdwebEnquiry> enquiryUpdateWrapper = new LambdaUpdateWrapper<>();
@@ -349,15 +346,13 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return false;
     }
 
-    /**
-     * 分配国家
-     */
+    /** 分配国家 */
     @PostMapping(value = "/contribute/delete")
     public Result<?> delete(@RequestBody DistributeCountryParam param) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        if(sysUser.isPerform()){
-//            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
-//        }
+        //        if(sysUser.isPerform()){
+        //            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
+        //        }
         String uid = param.getUid();
         String countryIds = param.getCountryIds();
         List<String> countryIdList = new ArrayList<>();
@@ -381,7 +376,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
             LambdaQueryWrapper<AdwebCountry> countryQueryWrapper = new LambdaQueryWrapper<>();
             countryQueryWrapper.in(AdwebCountry::getGeonameId, countryIdList);
             List<AdwebCountry> countries = admpCountryService.list(countryQueryWrapper);
-            List<String> countryCodes = countries.stream().map(AdwebCountry::getCountryIsoCode).collect(Collectors.toList());
+            List<String> countryCodes =
+                    countries.stream()
+                            .map(AdwebCountry::getCountryIsoCode)
+                            .collect(Collectors.toList());
             enquiryUpdateWrapper.notIn(AdwebEnquiry::getCountryCode, countryCodes);
         }
         enquiryUpdateWrapper.in(AdwebEnquiry::getSiteId, siteIds);
@@ -392,16 +390,15 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK();
     }
 
-    /**
-     * 更改分配方式
-     */
+    /** 更改分配方式 */
     @AutoLog(value = "询盘管理-询盘分配-分配规则切换")
     @PostMapping(value = "/updateDistributeType")
-    public Result<?> updateDistributeType(@RequestParam Integer siteId, @RequestParam String distributeType) {
+    public Result<?> updateDistributeType(
+            @RequestParam Integer siteId, @RequestParam String distributeType) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        if(sysUser.isPerform()){
-//            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
-//        }
+        //        if(sysUser.isPerform()){
+        //            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
+        //        }
         LambdaUpdateWrapper<AdwebSite> updateWrapper = new LambdaUpdateWrapper<>();
         updateWrapper.eq(AdwebSite::getId, siteId);
         updateWrapper.set(AdwebSite::getEnquiryDistributeType, distributeType);
@@ -424,16 +421,15 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK();
     }
 
-    /**
-     * 更改询盘发送规则
-     */
+    /** 更改询盘发送规则 */
     @AutoLog(value = "询盘管理-询盘分配-更改询盘发送规则")
     @PostMapping(value = "/updateSendEmailType")
-    public Result<?> updateSendEmailType(@RequestParam Integer siteId, @RequestParam String sendEmailType) {
+    public Result<?> updateSendEmailType(
+            @RequestParam Integer siteId, @RequestParam String sendEmailType) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        if(sysUser.isPerform()){
-//            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
-//        }
+        //        if(sysUser.isPerform()){
+        //            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
+        //        }
         LambdaUpdateWrapper<AdwebSite> updateWrapper = new LambdaUpdateWrapper<>();
         updateWrapper.eq(AdwebSite::getId, siteId);
         updateWrapper.set(AdwebSite::getEnquirySendEmailType, sendEmailType);
@@ -442,9 +438,7 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         return Result.OK();
     }
 
-    /**
-     * 根据站点id获取站点信息
-     */
+    /** 根据站点id获取站点信息 */
     @GetMapping(value = "/getSiteBySiteId")
     public Result<?> getSiteBySiteId(Integer siteId) {
         AdwebSite site = adwebSiteService.getById(siteId);
@@ -462,9 +456,9 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
     @PostMapping(value = "/add")
     public Result<?> add(@RequestBody AdwebUserCountry adwebUserCountry) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        if(sysUser.isPerform()){
-//            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
-//        }
+        //        if(sysUser.isPerform()){
+        //            return Result.FORBIDDEN("\"演示版\"没有操作权限,如果需要操作,请切换到\"正式版\"再操作!");
+        //        }
         adwebUserCountryService.save(adwebUserCountry);
         return Result.OK("添加成功!");
     }
@@ -536,7 +530,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
      */
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, AdwebUserCountry adwebUserCountry) {
-        return super.exportXls(request, adwebUserCountry, AdwebUserCountry.class, "adweb_user_country");
+        return super.exportXls(
+                request, adwebUserCountry, AdwebUserCountry.class, "adweb_user_country");
     }
 
     /**
@@ -550,5 +545,4 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
         return super.importExcel(request, response, AdwebUserCountry.class);
     }
-
 }

+ 0 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/DistributeCountryParam.java

@@ -1,6 +1,5 @@
 package org.jeecg.modules.adweb.userCountry.dto;
 
-
 import lombok.Data;
 
 @Data

+ 1 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/SubUser.java

@@ -2,9 +2,7 @@ package org.jeecg.modules.adweb.userCountry.dto;
 
 import lombok.Data;
 
-/**
- * 子账户
- */
+/** 子账户 */
 @Data
 public class SubUser {
 
@@ -18,4 +16,3 @@ public class SubUser {
 
     private int EnquiryNum;
 }
-

+ 1 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/dto/TreeOption.java

@@ -4,9 +4,7 @@ import lombok.Data;
 
 import java.util.List;
 
-/**
- * 国家选项的结构
- */
+/** 国家选项的结构 */
 @Data
 public class TreeOption {
 
@@ -17,5 +15,4 @@ public class TreeOption {
     private String title;
 
     private List<TreeOption> children;
-
 }

+ 3 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/IAdwebUserCountryService.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.adweb.userCountry.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+
 import org.jeecg.modules.adweb.userCountry.entity.AdwebUserCountry;
 
 import java.util.List;
@@ -8,7 +9,7 @@ import java.util.List;
 /**
  * @Description: adweb_user_country
  * @Author: jeecg-boot
- * @Date:   2022-08-19
+ * @Date: 2022-08-19
  * @Version: V1.0
  */
 public interface IAdwebUserCountryService extends IService<AdwebUserCountry> {
@@ -24,10 +25,9 @@ public interface IAdwebUserCountryService extends IService<AdwebUserCountry> {
     /**
      * 根据子账户的id获取分配给其负责的国家列表
      *
-     * @param id     子账户id
+     * @param id 子账户id
      * @param siteId 站点id
      * @return 国家code列表
      */
     List<String> getCountryCodesBySubId(String id, Integer siteId);
-
 }

+ 3 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/impl/AdwebCountryServiceImpl.java

@@ -9,10 +9,9 @@ import org.springframework.stereotype.Service;
 /**
  * @Description: admp_country
  * @Author: jeecg-boot
- * @Date:   2021-11-16
+ * @Date: 2021-11-16
  * @Version: V1.0
  */
 @Service
-public class AdwebCountryServiceImpl extends ServiceImpl<AdwebCountryMapper, AdwebCountry> implements IAdwebCountryService {
-
-}
+public class AdwebCountryServiceImpl extends ServiceImpl<AdwebCountryMapper, AdwebCountry>
+        implements IAdwebCountryService {}

+ 11 - 10
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/impl/AdwebUserCountryServiceImpl.java

@@ -18,14 +18,15 @@ import java.util.stream.Collectors;
 /**
  * @Description: adweb_user_country
  * @Author: jeecg-boot
- * @Date:   2022-08-19
+ * @Date: 2022-08-19
  * @Version: V1.0
  */
 @Service
-public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMapper, AdwebUserCountry> implements IAdwebUserCountryService {
+public class AdwebUserCountryServiceImpl
+        extends ServiceImpl<AdwebUserCountryMapper, AdwebUserCountry>
+        implements IAdwebUserCountryService {
 
-    @Resource
-    private IAdwebCountryService adwebCountryService;
+    @Resource private IAdwebCountryService adwebCountryService;
 
     /**
      * 根据子账户的id获取分配给其负责的国家列表
@@ -35,10 +36,11 @@ public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMap
      */
     @Override
     public List<Integer> getCountryIdsBySubId(String id) {
-        LambdaQueryWrapper<AdwebUserCountry> queryWrapper = new LambdaQueryWrapper<AdwebUserCountry>()
-                .select(AdwebUserCountry::getCountryId)
-                .eq(AdwebUserCountry::getUid, id)
-                .eq(AdwebUserCountry::getStatus, 1);
+        LambdaQueryWrapper<AdwebUserCountry> queryWrapper =
+                new LambdaQueryWrapper<AdwebUserCountry>()
+                        .select(AdwebUserCountry::getCountryId)
+                        .eq(AdwebUserCountry::getUid, id)
+                        .eq(AdwebUserCountry::getStatus, 1);
         List<AdwebUserCountry> list = this.list(queryWrapper);
         if (CollectionUtils.isEmpty(list)) {
             return new ArrayList<>();
@@ -49,7 +51,7 @@ public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMap
     /**
      * 根据子账户的id获取分配给其负责的国家列表
      *
-     * @param id     子账户id
+     * @param id 子账户id
      * @param siteId 站点id
      * @return 国家code列表
      */
@@ -64,5 +66,4 @@ public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMap
         List<AdwebCountry> countries = adwebCountryService.list(queryWrapper);
         return countries.stream().map(AdwebCountry::getCountryIsoCode).collect(Collectors.toList());
     }
-
 }