xie.kaifeng 7 месяцев назад
Родитель
Сommit
c976d321df

+ 8 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganController.java

@@ -223,8 +223,14 @@ public class OrganController {
     @ApiOperation("会员机构管理-->机构管理-->新增、修改")
     @RequestMapping(method = RequestMethod.POST, value = "/roleadd")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult roleadd(@RequestBody OrganRoleModifyParam vo, HttpServletRequest request) {
-        return iOrganService.roleadd(vo, request);
+    private AjaxResult roleadd(@RequestBody String vo, HttpServletRequest request) {
+        try {
+            OrganRoleModifyParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(vo, request), OrganRoleModifyParam.class);
+            return iOrganService.roleadd(current, request);
+        } catch (Exception e) {
+            log.error("机构管理-->新增、修改失败,失败原因:" + Arrays.toString(e.getStackTrace()));
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
+        }
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构资料管理-->注销")

+ 4 - 4
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ReportFormController.java

@@ -28,15 +28,15 @@ public class ReportFormController {
 
     @RequestMapping(method = RequestMethod.GET, value = "/shareAmountQuery")
     @ApiOperation("报表管理-->分润报表(机构)")
-    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    public PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    public AjaxResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
         return iReportFormService.selectShareAmount(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/shareAmountQueryPlat")
     @ApiOperation("报表管理-->分润报表(平台)")
-    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    public PageResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request) {
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    public AjaxResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request) {
         return iReportFormService.shareAmountQueryPlat(param, request);
     }
 

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IReportFormService.java

@@ -11,7 +11,7 @@ import java.util.List;
 import java.util.Map;
 
 public interface IReportFormService {
-    PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request);
+    AjaxResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request);
 
     AjaxResult<RefUserResult> queryRefUserSelect(String searchcode, HttpServletRequest request);
 
@@ -53,5 +53,5 @@ public interface IReportFormService {
 
     AjaxResult goodscountexport(GoodsReportParam param, HttpServletRequest request);
 
-    PageResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request);
+    AjaxResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request);
 }

+ 6 - 6
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/OrganServiceImpl.java

@@ -720,7 +720,7 @@ public class OrganServiceImpl implements IOrganService {
             iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid).eq("roletype", role));
 
             Useraccount uc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
-            iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accounted", uc.getReckonaccountid()));
+            iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", uc.getReckonaccountid()));
 
             //Ms_ExtendRole
             iMsExtendroleMapper.delete(new QueryWrapper<MsExtendrole>().eq("areauserid", areaid).eq("roletypeid", 4L));
@@ -885,7 +885,7 @@ public class OrganServiceImpl implements IOrganService {
 
         // 删除运营机构商品权限配置 2024-01-15
         if (role == SysEnums.OrganRole.operate.getCode().intValue()) {
-            iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("userid", areaid));
+            iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid));
         }
 
         List<Loginaccount> list = iLoginaccountMapper.selectList(new QueryWrapper<Loginaccount>()
@@ -2443,7 +2443,7 @@ public class OrganServiceImpl implements IOrganService {
                     .eq("loginusertype", 2));
             if (CollectionUtils.isEmpty(loginList)) {
                 String defaultPwd = "123456";
-                Systemparam defaultPwdParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paraCode", SysConstants.SYSPARAM_CODE_DEFAULT_PWD));
+                Systemparam defaultPwdParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paramcode", SysConstants.SYSPARAM_CODE_DEFAULT_PWD));
                 if (defaultPwdParam != null && !defaultPwdParam.getParamvalue().isEmpty()) {
                     defaultPwd = defaultPwdParam.getParamvalue();
                 }
@@ -2668,7 +2668,7 @@ public class OrganServiceImpl implements IOrganService {
 
     private void addMarketRightToMainAccount(OrganRoleModifyParam vo, Systemmanager opeartion, List<TaAccountMarketVo> dtype) {
         //默认资金账户附上所选市场权限 0-否,1-是
-        Systemparam sysparm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paraCode", SysConstants.SYSPARAM_CODE_ISTAACCOUNTMARKETROLE));
+        Systemparam sysparm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paramcode", SysConstants.SYSPARAM_CODE_ISTAACCOUNTMARKETROLE));
         if (sysparm != null && "1".equals(sysparm.getParamvalue())) {
             if (dtype != null && !dtype.isEmpty()) {
                 Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>()
@@ -2695,7 +2695,7 @@ public class OrganServiceImpl implements IOrganService {
 
     private void generatePCLoginAccount(OrganRoleModifyParam vo, Systemmanager opeartion) {
         Long loginid = null; //新加的登录账号ID
-        Systemparam sysparm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paraCode", SysConstants.SYSPARAM_CODE_ISAUTOEXCUTELOGIN));
+        Systemparam sysparm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paramcode", SysConstants.SYSPARAM_CODE_ISAUTOEXCUTELOGIN));
         //自营会员是否自动生成登录账户
         if (sysparm != null && "1".equals(sysparm.getParamvalue())) {
             List<Loginaccount> loginList = iLoginaccountMapper.selectList(new QueryWrapper<Loginaccount>()
@@ -2704,7 +2704,7 @@ public class OrganServiceImpl implements IOrganService {
             if (loginList.isEmpty()) {
                 String defaultPwd = "123456";
 
-                Systemparam defaultPwdParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paraCode", SysConstants.SYSPARAM_CODE_DEFAULT_PWD));
+                Systemparam defaultPwdParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("paramcode", SysConstants.SYSPARAM_CODE_DEFAULT_PWD));
                 if (defaultPwdParam != null && !defaultPwdParam.getParamvalue().equals("")) {
                     defaultPwd = defaultPwdParam.getParamvalue();
                 }

+ 10 - 32
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ReportFormServiceImpl.java

@@ -64,7 +64,7 @@ public class ReportFormServiceImpl implements IReportFormService {
     private IGoodsMapper iGoodsMapper;
 
     @Override
-    public PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
+    public AjaxResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Object devidetype = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, SysConstants.SYSPARAM_CODE_DIVIDE);
         if (devidetype == null || "1".equals(devidetype.toString())) {
@@ -81,11 +81,9 @@ public class ReportFormServiceImpl implements IReportFormService {
                 param.setAreaid(systemmanager.getAreauserid());
             }
         }
-        IPage<ShareAmountQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
-        IPage<ShareAmountQueryResult> resultIPage;
-
+        List<ShareAmountQueryResult> resultIPage;
         if (param.getCycletype() == null || param.getCycletype() == 0) {
-            resultIPage = detailMapper.queryDayDivide(page, param);
+            resultIPage = detailMapper.queryDayDivide(param);
         } else {
             if (param.getCycletype() == 2 && param.getQuarter() != null) {
                 param.setTradedate(param.getTradedate() + param.getQuarter());
@@ -94,22 +92,13 @@ public class ReportFormServiceImpl implements IReportFormService {
                 param.setCycletime(param.getTradedate());
                 param.setTradedate(null);
             }
-            resultIPage = detailMapper.queryReportDivide(page, param);
+            resultIPage = detailMapper.queryReportDivide(param);
         }
-        PageResult<ShareAmountQueryResult> pageResult = new PageResult<>();
-        pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
-        pageResult.setPages(resultIPage.getPages());
-        pageResult.setCurrent(resultIPage.getCurrent());
-        pageResult.setTotal(resultIPage.getTotal());
-        pageResult.setPageSize(resultIPage.getSize());
-        pageResult.setData(resultIPage.getRecords());
-        return pageResult;
-
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), resultIPage);
     }
 
     @Override
-    public PageResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request) {
+    public AjaxResult<ShareAmountQueryResult> shareAmountQueryPlat(ShareAmountQueryParam param, HttpServletRequest request) {
         //只能查询自己和下一级的
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (systemmanager.getReletype() != 1) {
@@ -119,29 +108,18 @@ public class ReportFormServiceImpl implements IReportFormService {
                 param.setParentuserid(systemmanager.getAreauserid());
             }
         }
-
-        IPage<ShareAmountQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
-        IPage<ShareAmountQueryResult> resultIPage;
-
+        List<ShareAmountQueryResult> resultIPage;
         if (param.getCycletype() == 0) {
-            resultIPage = detailMapper.queryByDate(page, param);
+            resultIPage = detailMapper.queryByDate(param);
         } else {
             //周、月、季、年、全
             if (param.getCycletype() == 2) {
                 //季报表
                 param.setTradedate(param.getTradedate() + param.getQuarter());
             }
-            resultIPage = detailMapper.queryByOther(page, param);
+            resultIPage = detailMapper.queryByOther(param);
         }
-        PageResult<ShareAmountQueryResult> pageResult = new PageResult<>();
-        pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
-        pageResult.setPages(resultIPage.getPages());
-        pageResult.setCurrent(resultIPage.getCurrent());
-        pageResult.setTotal(resultIPage.getTotal());
-        pageResult.setPageSize(resultIPage.getSize());
-        pageResult.setData(resultIPage.getRecords());
-        return pageResult;
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), resultIPage);
     }
 
 

+ 4 - 4
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IReckonDaydividecountdetailMapper.java

@@ -25,9 +25,9 @@ import java.util.List;
 @Mapper
 public interface IReckonDaydividecountdetailMapper extends BaseMapper<ReckonDaydividecountdetail> {
 
-    IPage<ShareAmountQueryResult> queryDayDivide(IPage<ShareAmountQueryResult> page, @Param("vo") ShareAmountQueryParam param);
+    List<ShareAmountQueryResult> queryDayDivide( @Param("vo") ShareAmountQueryParam param);
 
-    IPage<ShareAmountQueryResult> queryReportDivide(IPage<ShareAmountQueryResult> page, @Param("vo") ShareAmountQueryParam param);
+    List<ShareAmountQueryResult> queryReportDivide( @Param("vo") ShareAmountQueryParam param);
 
     IPage<TradeQueryResult> queryTrade(IPage<TradeQueryResult> page,@Param("vo")  TradeQueryParam param);
 
@@ -63,7 +63,7 @@ public interface IReckonDaydividecountdetailMapper extends BaseMapper<ReckonDayd
 
     void execReportMonthType(@Param("tradedate") Date tradedate);
 
-    IPage<ShareAmountQueryResult> queryByDate(IPage<ShareAmountQueryResult> page,@Param("vo") ShareAmountQueryParam param);
+    List<ShareAmountQueryResult> queryByDate(@Param("vo") ShareAmountQueryParam param);
 
-    IPage<ShareAmountQueryResult> queryByOther(IPage<ShareAmountQueryResult> page,@Param("vo")  ShareAmountQueryParam param);
+    List<ShareAmountQueryResult> queryByOther(@Param("vo")  ShareAmountQueryParam param);
 }

+ 1 - 7
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/reportform/ShareAmountQueryParam.java

@@ -16,7 +16,7 @@ public class ShareAmountQueryParam {
 
     private Long areaid;
 
-    private Long areaname;
+    private String areaname;
 
     @ApiModelProperty(value = "报表类型")
     private Integer cycletype;
@@ -42,12 +42,6 @@ public class ShareAmountQueryParam {
 
     private Integer ismarketing;
 
-    @ApiModelProperty(value = "* 页码 *")
-    private Integer pageNum;
-
-    @ApiModelProperty(value = "* 页大小 *")
-    private Integer pageSize;
-
     private String cycletime;
 
     private Long parentareaid;