|
|
@@ -94,20 +94,20 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
@Override
|
|
|
public ResponseResultVO getCompanyMaxStaffNum(Integer id) {
|
|
|
Company company = companyMapper.selectById(id);
|
|
|
- Map<String,Object> mp = new HashMap<>();
|
|
|
+ Map<String, Object> mp = new HashMap<>();
|
|
|
// 解析license信息
|
|
|
String licenseStr = AESUtil.desEncrypt(company.getLicense());
|
|
|
- if(licenseStr != null ){
|
|
|
- Map<String,Object> licenseMap = JSON.parseObject(licenseStr,Map.class);
|
|
|
- if(licenseMap.get("web_max_num") != null){
|
|
|
- mp.put("web_max_num",Integer.parseInt(licenseMap.get("web_max_num").toString()));
|
|
|
+ if (licenseStr != null) {
|
|
|
+ Map<String, Object> licenseMap = JSON.parseObject(licenseStr, Map.class);
|
|
|
+ if (licenseMap.get("web_max_num") != null) {
|
|
|
+ mp.put("web_max_num", Integer.parseInt(licenseMap.get("web_max_num").toString()));
|
|
|
}
|
|
|
- if(licenseMap.get("wx_max_num") != null){
|
|
|
- mp.put("wx_max_num",Integer.parseInt(licenseMap.get("wx_max_num").toString()));
|
|
|
+ if (licenseMap.get("wx_max_num") != null) {
|
|
|
+ mp.put("wx_max_num", Integer.parseInt(licenseMap.get("wx_max_num").toString()));
|
|
|
}
|
|
|
- }else{
|
|
|
- mp.put("web_max_num",1);
|
|
|
- mp.put("wx_max_num",1);
|
|
|
+ } else {
|
|
|
+ mp.put("web_max_num", 1);
|
|
|
+ mp.put("wx_max_num", 1);
|
|
|
}
|
|
|
|
|
|
return ResponseResultUtil.success(mp);
|
|
|
@@ -120,7 +120,39 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
*/
|
|
|
@Override
|
|
|
public ResponseResultVO selectByOpenId(String openid) {
|
|
|
- return ResponseResultUtil.success(companyMapper.selectByOpenId(openid));
|
|
|
+ List<CompanyResponse> companies = companyMapper.selectByOpenId(openid);
|
|
|
+ List<CompanyResponse> companiesnew = new ArrayList<>();
|
|
|
+ for (int i = 0; i < companies.size(); i++) {
|
|
|
+ CompanyResponse company = companies.get(i);
|
|
|
+ // 解析license信息
|
|
|
+ String licenseStr = AESUtil.desEncrypt(company.getLicense());
|
|
|
+ if (licenseStr != null) {
|
|
|
+ Map<String, Object> licenseMap = JSON.parseObject(licenseStr, Map.class);
|
|
|
+ LocalDate endDate = LocalDate.parse(licenseMap.get("end_date").toString());
|
|
|
+ // 判断是否到期
|
|
|
+ LocalDate nowDate = LocalDate.now();
|
|
|
+ if (endDate.isBefore(nowDate)) {
|
|
|
+ company.setIsExpire(true);
|
|
|
+ }
|
|
|
+ if (licenseMap.get("web_max_num") != null) {
|
|
|
+ company.setWebMaxNum(Integer.parseInt(licenseMap.get("web_max_num").toString()));
|
|
|
+ }
|
|
|
+ if (licenseMap.get("wx_max_num") != null) {
|
|
|
+ company.setWxMaxNum(Integer.parseInt(licenseMap.get("wx_max_num").toString()));
|
|
|
+ }
|
|
|
+ company.setEndDate(endDate);
|
|
|
+ if (licenseMap.get("user_end_date") != null) {
|
|
|
+ company.setUserEndDate(LocalDate.parse(licenseMap.get("user_end_date").toString()));
|
|
|
+ }
|
|
|
+ if (licenseMap.get("vip") != null) {
|
|
|
+ company.setVip(Boolean.parseBoolean(licenseMap.get("vip").toString()));
|
|
|
+ }
|
|
|
+ company.setGradeCode(licenseMap.get("grade_code").toString());
|
|
|
+ }
|
|
|
+ companiesnew.add(company);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ResponseResultUtil.success(companiesnew);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -149,7 +181,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
public ResponseResultVO updateCompanyCurStaffNum(Map<String, Object> map) {
|
|
|
Integer curStaffNum = Integer.valueOf(map.get("curStaffNum") + "");
|
|
|
Integer cpId = Integer.valueOf(map.get("cpId") + "");
|
|
|
- companyMapper.updateCompanyCurStaffNum(cpId, curStaffNum);
|
|
|
+ companyMapper.updateCompanyCurStaffNum(cpId, curStaffNum);
|
|
|
return ResponseResultUtil.success(true);
|
|
|
}
|
|
|
|
|
|
@@ -192,7 +224,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
// company.setCurStaffNum(1);
|
|
|
|
|
|
// 标准版默认2099年,1PC授权,1WX授权
|
|
|
- if(Constant.GradeCode.STD.getName().equals(company.getGradeCode())){
|
|
|
+ if (Constant.GradeCode.STD.getName().equals(company.getGradeCode())) {
|
|
|
company.setEndDate(LocalDate.parse("2099-12-31"));
|
|
|
companyVO.setWebMaxNum(0);
|
|
|
companyVO.setWxMaxNum(1);
|
|
|
@@ -201,16 +233,16 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
//获取具体服务的地址
|
|
|
company.setSvcCode(companyMapper.selectServiceAllot(company.getGradeCode()));
|
|
|
// 生成临时license授权
|
|
|
- Map<String,Object> licenseMap = new HashMap<>();
|
|
|
- licenseMap.put("grade_code",company.getGradeCode());
|
|
|
- licenseMap.put("end_date",company.getEndDate());
|
|
|
- licenseMap.put("web_max_num",companyVO.getWebMaxNum());
|
|
|
- licenseMap.put("wx_max_num",companyVO.getWxMaxNum());
|
|
|
+ Map<String, Object> licenseMap = new HashMap<>();
|
|
|
+ licenseMap.put("grade_code", company.getGradeCode());
|
|
|
+ licenseMap.put("end_date", company.getEndDate());
|
|
|
+ licenseMap.put("web_max_num", companyVO.getWebMaxNum());
|
|
|
+ licenseMap.put("wx_max_num", companyVO.getWxMaxNum());
|
|
|
// 标准版
|
|
|
- if(Constant.GradeCode.STD.getName().equals(company.getGradeCode())){
|
|
|
- company.setLicense(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
|
|
|
- }else{
|
|
|
- company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
|
|
|
+ if (Constant.GradeCode.STD.getName().equals(company.getGradeCode())) {
|
|
|
+ company.setLicense(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)));
|
|
|
+ } else {
|
|
|
+ company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)));
|
|
|
}
|
|
|
companyMapper.insert(company);
|
|
|
// 动态设置服务的地址
|
|
|
@@ -224,7 +256,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
|
|
|
Trade trade = new Trade();
|
|
|
// 专业版才插入交易记录
|
|
|
- if(Constant.GradeCode.PRO.getName().equals(company.getGradeCode())) {
|
|
|
+ if (Constant.GradeCode.PRO.getName().equals(company.getGradeCode())) {
|
|
|
// 生成交易记录
|
|
|
trade.setTradeNo(companyVO.getTradeNo());
|
|
|
trade.setCpId(company.getCpId());
|
|
|
@@ -285,8 +317,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
List<Integer> cpIds = new ArrayList<>();
|
|
|
cpIds.add(cpId);
|
|
|
// 当天的userid可能 存在加入公司
|
|
|
- if (userLogin.getJoinedCps()!=null && userLogin.getJoinedCps().size() > 0){
|
|
|
- cpIds.addAll(userLogin.getJoinedCps()) ;
|
|
|
+ if (userLogin.getJoinedCps() != null && userLogin.getJoinedCps().size() > 0) {
|
|
|
+ cpIds.addAll(userLogin.getJoinedCps());
|
|
|
}
|
|
|
userMapper.updateCpid(userLogin.getUserId(), cpId, cpIds);
|
|
|
|
|
|
@@ -295,135 +327,135 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
Map<String, List<Map<String, Object>>> map = new HashMap<>();
|
|
|
List<Map<String, Object>> listCom = new ArrayList<>();
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
- m.put("gradeCode",company.getGradeCode());
|
|
|
- m.put("cpId",cpId);
|
|
|
- m.put("staffId",staffId);
|
|
|
+ m.put("gradeCode", company.getGradeCode());
|
|
|
+ m.put("cpId", cpId);
|
|
|
+ m.put("staffId", staffId);
|
|
|
listCom.add(m);
|
|
|
- map.put("company",listCom);
|
|
|
+ map.put("company", listCom);
|
|
|
// 角色及权限
|
|
|
List<RoleResponse> roleResponses = roleMapper.selectByCond(new RoleQuery());
|
|
|
List<Map<String, Object>> listRoles = new ArrayList<>();
|
|
|
for (int i = 0; i < roleResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("roleCode",roleResponses.get(i).getRoleCode());
|
|
|
- m.put("roleName",roleResponses.get(i).getRoleName());
|
|
|
- m.put("displayNo",roleResponses.get(i).getDisplayNo());
|
|
|
+ m.put("roleCode", roleResponses.get(i).getRoleCode());
|
|
|
+ m.put("roleName", roleResponses.get(i).getRoleName());
|
|
|
+ m.put("displayNo", roleResponses.get(i).getDisplayNo());
|
|
|
listRoles.add(m);
|
|
|
}
|
|
|
- map.put("roles",listRoles);
|
|
|
+ map.put("roles", listRoles);
|
|
|
// 基础资料(仓库 渠道 )
|
|
|
List<WarehouseResponse> warehouseResponses = warehouseMapper.selectByCond(new WarehouseQuery());
|
|
|
List<Map<String, Object>> listWarehouses = new ArrayList<>();
|
|
|
for (int i = 0; i < warehouseResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("whCode",warehouseResponses.get(i).getWhCode());
|
|
|
- m.put("whName",warehouseResponses.get(i).getWhName());
|
|
|
- m.put("displayNo",warehouseResponses.get(i).getDisplayNo());
|
|
|
- m.put("flgDefault",warehouseResponses.get(i).getFlgDefault());
|
|
|
+ m.put("whCode", warehouseResponses.get(i).getWhCode());
|
|
|
+ m.put("whName", warehouseResponses.get(i).getWhName());
|
|
|
+ m.put("displayNo", warehouseResponses.get(i).getDisplayNo());
|
|
|
+ m.put("flgDefault", warehouseResponses.get(i).getFlgDefault());
|
|
|
listWarehouses.add(m);
|
|
|
}
|
|
|
- map.put("warehouses",listWarehouses);
|
|
|
+ map.put("warehouses", listWarehouses);
|
|
|
// 基础资料(仓库 渠道 )
|
|
|
List<SaleChannelResponse> saleChannelResponses = saleChannelMapper.selectByCond(new SaleChannelQuery());
|
|
|
List<Map<String, Object>> listSaleChannels = new ArrayList<>();
|
|
|
for (int i = 0; i < saleChannelResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("channelCode",saleChannelResponses.get(i).getChannelCode());
|
|
|
- m.put("channelName",saleChannelResponses.get(i).getChannelName());
|
|
|
- m.put("displayNo",saleChannelResponses.get(i).getDisplayNo());
|
|
|
- m.put("flgDefault",saleChannelResponses.get(i).getFlgDefault());
|
|
|
+ m.put("channelCode", saleChannelResponses.get(i).getChannelCode());
|
|
|
+ m.put("channelName", saleChannelResponses.get(i).getChannelName());
|
|
|
+ m.put("displayNo", saleChannelResponses.get(i).getDisplayNo());
|
|
|
+ m.put("flgDefault", saleChannelResponses.get(i).getFlgDefault());
|
|
|
listSaleChannels.add(m);
|
|
|
}
|
|
|
- map.put("saleChannels",listSaleChannels);
|
|
|
+ map.put("saleChannels", listSaleChannels);
|
|
|
// 基础资料(仓库 渠道 收入 支出 入库 出库 账户 来源 盈亏原因)
|
|
|
List<DictionaryDataResponse> dictionaryDataResponses = dictionaryDataMapper.selectByCond(new DictionaryDataQuery());
|
|
|
List<Map<String, Object>> listDictionaryDatas = new ArrayList<>();
|
|
|
for (int i = 0; i < dictionaryDataResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("dictCode",dictionaryDataResponses.get(i).getDictCode());
|
|
|
- m.put("dataCode",dictionaryDataResponses.get(i).getDataCode());
|
|
|
- m.put("dataValue",dictionaryDataResponses.get(i).getDataValue());
|
|
|
- m.put("displayNo",dictionaryDataResponses.get(i).getDisplayNo());
|
|
|
- m.put("flgDefault",dictionaryDataResponses.get(i).getFlgDefault());
|
|
|
+ m.put("dictCode", dictionaryDataResponses.get(i).getDictCode());
|
|
|
+ m.put("dataCode", dictionaryDataResponses.get(i).getDataCode());
|
|
|
+ m.put("dataValue", dictionaryDataResponses.get(i).getDataValue());
|
|
|
+ m.put("displayNo", dictionaryDataResponses.get(i).getDisplayNo());
|
|
|
+ m.put("flgDefault", dictionaryDataResponses.get(i).getFlgDefault());
|
|
|
listDictionaryDatas.add(m);
|
|
|
}
|
|
|
- map.put("dictionaryDatas",listDictionaryDatas);
|
|
|
+ map.put("dictionaryDatas", listDictionaryDatas);
|
|
|
// 资金账户
|
|
|
List<MoneyAccountResponse> moneyAccountResponses = moneyAccountMapper.selectByCond(new MoneyAccountQuery());
|
|
|
List<Map<String, Object>> listMoneyAccounts = new ArrayList<>();
|
|
|
for (int i = 0; i < moneyAccountResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("macCode",moneyAccountResponses.get(i).getMacCode());
|
|
|
- m.put("macName",moneyAccountResponses.get(i).getMacName());
|
|
|
- m.put("macType",moneyAccountResponses.get(i).getMacType());
|
|
|
- m.put("balance",moneyAccountResponses.get(i).getBalance());
|
|
|
- m.put("accDate",moneyAccountResponses.get(i).getAccDate());
|
|
|
- m.put("displayNo",moneyAccountResponses.get(i).getDisplayNo());
|
|
|
- m.put("flgDefault",moneyAccountResponses.get(i).getFlgDefault());
|
|
|
- m.put("flgNegative",moneyAccountResponses.get(i).getFlgNegative());
|
|
|
+ m.put("macCode", moneyAccountResponses.get(i).getMacCode());
|
|
|
+ m.put("macName", moneyAccountResponses.get(i).getMacName());
|
|
|
+ m.put("macType", moneyAccountResponses.get(i).getMacType());
|
|
|
+ m.put("balance", moneyAccountResponses.get(i).getBalance());
|
|
|
+ m.put("accDate", moneyAccountResponses.get(i).getAccDate());
|
|
|
+ m.put("displayNo", moneyAccountResponses.get(i).getDisplayNo());
|
|
|
+ m.put("flgDefault", moneyAccountResponses.get(i).getFlgDefault());
|
|
|
+ m.put("flgNegative", moneyAccountResponses.get(i).getFlgNegative());
|
|
|
listMoneyAccounts.add(m);
|
|
|
}
|
|
|
- map.put("moneyAccounts",listMoneyAccounts);
|
|
|
+ map.put("moneyAccounts", listMoneyAccounts);
|
|
|
// 计量单位
|
|
|
List<UnitResponse> unitResponses = unitMapper.selectByCond(new UnitQuery());
|
|
|
List<Map<String, Object>> listUnits = new ArrayList<>();
|
|
|
for (int i = 0; i < unitResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("unitCode",unitResponses.get(i).getUnitCode());
|
|
|
- m.put("unitName",unitResponses.get(i).getUnitName());
|
|
|
- m.put("decimalPlaces",unitResponses.get(i).getDecimalPlaces());
|
|
|
- m.put("displayNo",unitResponses.get(i).getDisplayNo());
|
|
|
+ m.put("unitCode", unitResponses.get(i).getUnitCode());
|
|
|
+ m.put("unitName", unitResponses.get(i).getUnitName());
|
|
|
+ m.put("decimalPlaces", unitResponses.get(i).getDecimalPlaces());
|
|
|
+ m.put("displayNo", unitResponses.get(i).getDisplayNo());
|
|
|
listUnits.add(m);
|
|
|
}
|
|
|
- map.put("units",listUnits);
|
|
|
+ map.put("units", listUnits);
|
|
|
// 种类
|
|
|
List<GoodsCategoryResponse> goodsCategoryResponses = goodsCategoryMapper.selectByCond(new GoodsCategoryQuery());
|
|
|
List<Map<String, Object>> listGoodsCategorys = new ArrayList<>();
|
|
|
for (int i = 0; i < goodsCategoryResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("catId",goodsCategoryResponses.get(i).getCatId());
|
|
|
- m.put("catCode",goodsCategoryResponses.get(i).getCatCode());
|
|
|
- m.put("catName",goodsCategoryResponses.get(i).getCatName());
|
|
|
- m.put("parentId",goodsCategoryResponses.get(i).getParentId());
|
|
|
- m.put("topId",goodsCategoryResponses.get(i).getTopId());
|
|
|
- m.put("levelUpper",goodsCategoryResponses.get(i).getLevelUpper());
|
|
|
- m.put("levelLower",goodsCategoryResponses.get(i).getLevelLower());
|
|
|
- m.put("levelLeaf",goodsCategoryResponses.get(i).getLevelLeaf());
|
|
|
- m.put("levelNo",goodsCategoryResponses.get(i).getLevelNo());
|
|
|
- m.put("levelCode",goodsCategoryResponses.get(i).getLevelCode());
|
|
|
- m.put("levelName",goodsCategoryResponses.get(i).getLevelName());
|
|
|
- m.put("displayNo",goodsCategoryResponses.get(i).getDisplayNo());
|
|
|
+ m.put("catId", goodsCategoryResponses.get(i).getCatId());
|
|
|
+ m.put("catCode", goodsCategoryResponses.get(i).getCatCode());
|
|
|
+ m.put("catName", goodsCategoryResponses.get(i).getCatName());
|
|
|
+ m.put("parentId", goodsCategoryResponses.get(i).getParentId());
|
|
|
+ m.put("topId", goodsCategoryResponses.get(i).getTopId());
|
|
|
+ m.put("levelUpper", goodsCategoryResponses.get(i).getLevelUpper());
|
|
|
+ m.put("levelLower", goodsCategoryResponses.get(i).getLevelLower());
|
|
|
+ m.put("levelLeaf", goodsCategoryResponses.get(i).getLevelLeaf());
|
|
|
+ m.put("levelNo", goodsCategoryResponses.get(i).getLevelNo());
|
|
|
+ m.put("levelCode", goodsCategoryResponses.get(i).getLevelCode());
|
|
|
+ m.put("levelName", goodsCategoryResponses.get(i).getLevelName());
|
|
|
+ m.put("displayNo", goodsCategoryResponses.get(i).getDisplayNo());
|
|
|
listGoodsCategorys.add(m);
|
|
|
}
|
|
|
- map.put("goodsCategorys",listGoodsCategorys);
|
|
|
+ map.put("goodsCategorys", listGoodsCategorys);
|
|
|
// 常用功能
|
|
|
List<ComMenu> comMenus = comMenuMapper.selectByCond(new ComMenu().setGradeCode(company.getGradeCode()));
|
|
|
List<Map<String, Object>> listComMenu = new ArrayList<>();
|
|
|
for (int i = 0; i < comMenus.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("menuUuid",comMenus.get(i).getMenuUuid());
|
|
|
- m.put("appCode",comMenus.get(i).getAppCode());
|
|
|
- m.put("displayNo",comMenus.get(i).getDisplayNo());
|
|
|
+ m.put("menuUuid", comMenus.get(i).getMenuUuid());
|
|
|
+ m.put("appCode", comMenus.get(i).getAppCode());
|
|
|
+ m.put("displayNo", comMenus.get(i).getDisplayNo());
|
|
|
listComMenu.add(m);
|
|
|
}
|
|
|
- map.put("listComMenu",listComMenu);
|
|
|
+ map.put("listComMenu", listComMenu);
|
|
|
|
|
|
// 打印票据
|
|
|
List<PrintLayout> printLayoutResponses = printLayoutMapper.selectByCond(new PrintLayout());
|
|
|
List<Map<String, Object>> listPrintLayout = new ArrayList<>();
|
|
|
for (int i = 0; i < printLayoutResponses.size(); i++) {
|
|
|
m = new HashMap<>();
|
|
|
- m.put("layoutName",printLayoutResponses.get(i).getLayoutName());
|
|
|
- m.put("layoutData",printLayoutResponses.get(i).getLayoutData());
|
|
|
- m.put("displayNo",printLayoutResponses.get(i).getDisplayNo());
|
|
|
- m.put("docName",printLayoutResponses.get(i).getDocName());
|
|
|
- m.put("cpId",cpId);
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
+ m.put("layoutName", printLayoutResponses.get(i).getLayoutName());
|
|
|
+ m.put("layoutData", printLayoutResponses.get(i).getLayoutData());
|
|
|
+ m.put("displayNo", printLayoutResponses.get(i).getDisplayNo());
|
|
|
+ m.put("docName", printLayoutResponses.get(i).getDocName());
|
|
|
+ m.put("cpId", cpId);
|
|
|
+ m.put("opCreateUserId", staffId);
|
|
|
listPrintLayout.add(m);
|
|
|
}
|
|
|
- map.put("printLayout",listPrintLayout);
|
|
|
+ map.put("printLayout", listPrintLayout);
|
|
|
|
|
|
- ResponseResultVO listResponseResultVO = staffFeign.insertFeignCompanyData(map);
|
|
|
+ ResponseResultVO listResponseResultVO = staffFeign.insertFeignCompanyData(map);
|
|
|
|
|
|
// 如果没有成功返回
|
|
|
if (listResponseResultVO.getCode() != ResponseCodeEnum.SUCCESS.getCode()) {
|
|
|
@@ -444,18 +476,18 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
* @date : 2024-05-17 13:55
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public ResponseResultVO reNewCompany(CompanyVO companyVO){
|
|
|
+ public ResponseResultVO reNewCompany(CompanyVO companyVO) {
|
|
|
// 转实体
|
|
|
Company company = companyConvert.convertToPo(companyVO);
|
|
|
// 生成临时license授权
|
|
|
- Map<String,Object> licenseMap = new HashMap<>();
|
|
|
- licenseMap.put("grade_code",company.getGradeCode());
|
|
|
- licenseMap.put("end_date",company.getEndDate());
|
|
|
- licenseMap.put("user_end_date",companyVO.getUserEndDate());
|
|
|
- licenseMap.put("web_max_num",companyVO.getWebMaxNum());
|
|
|
- licenseMap.put("wx_max_num",companyVO.getWxMaxNum());
|
|
|
- licenseMap.put("vip",companyVO.getVip());
|
|
|
- company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
|
|
|
+ Map<String, Object> licenseMap = new HashMap<>();
|
|
|
+ licenseMap.put("grade_code", company.getGradeCode());
|
|
|
+ licenseMap.put("end_date", company.getEndDate());
|
|
|
+ licenseMap.put("user_end_date", companyVO.getUserEndDate());
|
|
|
+ licenseMap.put("web_max_num", companyVO.getWebMaxNum());
|
|
|
+ licenseMap.put("wx_max_num", companyVO.getWxMaxNum());
|
|
|
+ licenseMap.put("vip", companyVO.getVip());
|
|
|
+ company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)));
|
|
|
companyMapper.updateById(company);
|
|
|
// 生成交易记录
|
|
|
Trade trade = new Trade();
|
|
|
@@ -484,9 +516,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
)
|
|
|
public ResponseResultVO<?> saveMenuFrequency(MenuFrequency menuFrequency) {
|
|
|
MenuFrequency mf = companyMapper.selectMenuByUuid(menuFrequency);
|
|
|
- if(mf == null ){
|
|
|
+ if (mf == null) {
|
|
|
menuFrequency.setQty(1);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
menuFrequency.setQty(mf.getQty() + 1);
|
|
|
}
|
|
|
// 保存用户功能频率表
|
|
|
@@ -500,7 +532,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
* @date : 2024/6/14 9:39
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseResultVO getComMenu(String gradeCode){
|
|
|
+ public ResponseResultVO getComMenu(String gradeCode) {
|
|
|
List<ComMenu> comMenus = comMenuMapper.selectByCond(new ComMenu().setGradeCode(gradeCode));
|
|
|
return ResponseResultUtil.success(comMenus);
|
|
|
}
|