|
|
@@ -489,7 +489,16 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
licenseMap.put("web_max_num", companyVO.getWebMaxNum());
|
|
|
licenseMap.put("wx_max_num", companyVO.getWxMaxNum());
|
|
|
licenseMap.put("vip", companyVO.getVip());
|
|
|
+ licenseMap.put("fun_package", companyVO.getFunPackage());
|
|
|
+ licenseMap.put("re_new", companyVO.getReNew());
|
|
|
company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)));
|
|
|
+// 续费和升级
|
|
|
+ if (Constant.TradeType.RENEW.getName().equals(companyVO.getTradeType())) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
companyMapper.updateById(company);
|
|
|
// 生成交易记录
|
|
|
Trade trade = new Trade();
|
|
|
@@ -497,13 +506,22 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
trade.setCpId(companyVO.getCpId());
|
|
|
trade.setWxUserId(companyVO.getWxUserId());
|
|
|
trade.setTradeAmount(companyVO.getTradeAmount());
|
|
|
- trade.setTradeType(Constant.TradeType.UPGRADE.getName());
|
|
|
+ if (Constant.TradeType.RENEW.getName().equals(companyVO.getTradeType())) {
|
|
|
+ trade.setTradeType(Constant.TradeType.RENEW.getName());
|
|
|
+ } else {
|
|
|
+ trade.setTradeType(Constant.TradeType.UPGRADE.getName());
|
|
|
+ }
|
|
|
trade.setBuyLong(companyVO.getBuyLong());
|
|
|
trade.setBuyBeginDate(companyVO.getBuyBeginDate());
|
|
|
trade.setBuyEndDate(companyVO.getBuyEndDate());
|
|
|
trade.setExtendDays(companyVO.getExtendDays());
|
|
|
trade.setBuyGradeCode(companyVO.getGradeCode());
|
|
|
trade.setTradeStatus(Constant.TradeStatus.INEFFECTIVE.getName());
|
|
|
+ trade.setTradeDesc(companyVO.getRemarks());
|
|
|
+ trade.setActivityId(companyVO.getActivityId());
|
|
|
+ trade.setActivityItemId(companyVO.getActivityItemId());
|
|
|
+ trade.setActivityIds(companyVO.getActivityIds());
|
|
|
+ trade.setActivityItemIds(companyVO.getActivityItemIds());
|
|
|
tradeMapper.insert(trade);
|
|
|
return ResponseResultUtil.success(trade);
|
|
|
}
|
|
|
@@ -525,7 +543,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
licenseMap.put("web_max_num", companyVO.getWebMaxNum());
|
|
|
licenseMap.put("wx_max_num", companyVO.getWxMaxNum());
|
|
|
licenseMap.put("vip", companyVO.getVip());
|
|
|
- licenseMap.put("fun_package", companyVO.getFunPackage() );
|
|
|
+ licenseMap.put("fun_package", companyVO.getFunPackage());
|
|
|
+ licenseMap.put("re_new", companyVO.getReNew());
|
|
|
company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)));
|
|
|
companyMapper.updateById(company);
|
|
|
// 生成交易记录
|
|
|
@@ -543,9 +562,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
trade.setTradeStatus(Constant.TradeStatus.INEFFECTIVE.getName());
|
|
|
trade.setActivityId(companyVO.getActivityId());
|
|
|
trade.setActivityItemId(companyVO.getActivityItemId());
|
|
|
+ trade.setActivityIds(companyVO.getActivityIds());
|
|
|
+ trade.setActivityItemIds(companyVO.getActivityItemIds());
|
|
|
trade.setTradeDesc(companyVO.getRemarks());
|
|
|
- //积分 后期要加字段
|
|
|
-
|
|
|
tradeMapper.insert(trade);
|
|
|
return ResponseResultUtil.success(trade);
|
|
|
}
|
|
|
@@ -585,16 +604,16 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
private HaipHttpUtils haipHttpUtils;
|
|
|
|
|
|
/**
|
|
|
- * @desc : 商户负责人转让
|
|
|
+ * @desc : 商户负责人转让
|
|
|
* @author : 刘尧
|
|
|
- * @date : 2024/6/21 09:35
|
|
|
+ * @date : 2024/6/21 09:35
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseResultVO transferHead(Map<String,Object> params) {
|
|
|
+ public ResponseResultVO transferHead(Map<String, Object> params) {
|
|
|
|
|
|
// HaipHttpUtils haipHttpUtils = new HaipHttpUtils();
|
|
|
|
|
|
- String requestUrl = "http://" + params.get("svcIp") + ":"+ params.get("svcPort") +"/"
|
|
|
+ String requestUrl = "http://" + params.get("svcIp") + ":" + params.get("svcPort") + "/"
|
|
|
+ Constant.MDM_PREFIX
|
|
|
+ Constant.SERVER + "-"
|
|
|
+ params.get("svcCode")
|
|
|
@@ -602,13 +621,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
+ "/update_flgInit";
|
|
|
JSONObject JsonObject = haipHttpUtils.doPostRequest(requestUrl, params, String.valueOf(params.get("svcIp")), String.valueOf(params.get("svcPort")));
|
|
|
// 如果没有成功返回
|
|
|
- if (JsonObject.get("code") == null || !ResponseCodeEnum.SUCCESS.getCode().equals(JsonObject.get("code"))){
|
|
|
+ if (JsonObject.get("code") == null || !ResponseCodeEnum.SUCCESS.getCode().equals(JsonObject.get("code"))) {
|
|
|
return ResponseResultUtil.error();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
boolean b = companyMapper.updateOwner(params);
|
|
|
if (b) {
|
|
|
return ResponseResultUtil.success(200, "更新成功");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
return ResponseResultUtil.error();
|
|
|
}
|
|
|
}
|