Преглед изворни кода

bug CESHI

release_toaliyun_real
xhxu пре 5 година
родитељ
комит
b986892708
6 измењених фајлова са 56 додато и 58 уклоњено
  1. +45
    -48
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java
  2. +2
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/mem/WxCreditHistoryController.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCreditHistoryMapper.java
  4. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java
  5. +0
    -1
      mallinkService/src/main/resources/mapper/WxCreditHistoryMapper.xml
  6. +4
    -4
      mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java

+ 45
- 48
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java Прегледај датотеку

@@ -149,10 +149,10 @@ public class WxProjectConfigController extends BaseController {
if(wxMall.getId() == null){ if(wxMall.getId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
} }
TenantEntity TenantEntity = new TenantEntity(){{
setTenantId(wxMall.getId().toString());
}};
WxMall parentWxMall = wxMallService.getByTenantInfo(TenantEntity);
TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(wxMall.getId().toString());
WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity);
if(parentWxMall == null || parentWxMall.getSaleType() != 100 if(parentWxMall == null || parentWxMall.getSaleType() != 100
|| !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
|| StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){
@@ -558,74 +558,72 @@ public class WxProjectConfigController extends BaseController {
map.put("wxMall",wxMall); map.put("wxMall",wxMall);
List<WxMall> subWxMall = wxMallService.getSubByParentTenantId(wxMall.getTenantId()); List<WxMall> subWxMall = wxMallService.getSubByParentTenantId(wxMall.getTenantId());
map.put("subWxMall",subWxMall); map.put("subWxMall",subWxMall);
WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig(){{
setTenantId(wxMall.getTenantId());
}};
WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig();
wxCouponSendConfig.setTenantId(wxMall.getTenantId());
List<WxCouponSendConfig> wxCouponSendConfigList = wxCouponSendConfigService.findList(wxCouponSendConfig); List<WxCouponSendConfig> wxCouponSendConfigList = wxCouponSendConfigService.findList(wxCouponSendConfig);
map.put("wxCouponSendConfigList",wxCouponSendConfigList); map.put("wxCouponSendConfigList",wxCouponSendConfigList);
WxScoreRules wxScoreRules = new WxScoreRules(){{
setTenantId(wxMall.getTenantId());
}};
WxScoreRules wxScoreRules = new WxScoreRules();
wxScoreRules.setTenantId(wxMall.getTenantId());
List<WxScoreRules> wxScoreRulesList = wxScoreRulesService.findList(wxScoreRules); List<WxScoreRules> wxScoreRulesList = wxScoreRulesService.findList(wxScoreRules);
map.put("wxScoreRulesList",wxScoreRulesList); map.put("wxScoreRulesList",wxScoreRulesList);
WxTemplateMsg wxTemplateMsg = new WxTemplateMsg(){{
setTenantId(wxMall.getTenantId());
}};
WxTemplateMsg wxTemplateMsg = new WxTemplateMsg();
wxTemplateMsg.setTenantId(wxMall.getTenantId());
List<WxTemplateMsg> wxTemplateMsgList = wxTemplateMsgService.findList(wxTemplateMsg); List<WxTemplateMsg> wxTemplateMsgList = wxTemplateMsgService.findList(wxTemplateMsg);
map.put("wxTemplateMsgList",wxTemplateMsgList); map.put("wxTemplateMsgList",wxTemplateMsgList);
WxQuestion wxQuestion = new WxQuestion(){{
setTenantId(wxMall.getTenantId());
}};
WxQuestion wxQuestion = new WxQuestion();
wxQuestion.setTenantId(wxMall.getTenantId());
List<WxQuestion> wxQuestionList = wxQuestionService.findList(wxQuestion); List<WxQuestion> wxQuestionList = wxQuestionService.findList(wxQuestion);
map.put("wxQuestionList",wxQuestionList); map.put("wxQuestionList",wxQuestionList);
WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(){{
setTenantId(wxMall.getTenantId());
}};
WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel();
wxMsgValidationcodeModel.setTenantId(wxMall.getTenantId());
List<WxMsgValidationcodeModel> wxMsgValidationcodeModelList = wxMsgValidationcodeModelService.findList(wxMsgValidationcodeModel); List<WxMsgValidationcodeModel> wxMsgValidationcodeModelList = wxMsgValidationcodeModelService.findList(wxMsgValidationcodeModel);
map.put("wxMsgValidationcodeModelList",wxMsgValidationcodeModelList); map.put("wxMsgValidationcodeModelList",wxMsgValidationcodeModelList);
WxFlowConfig wxFlowConfig = new WxFlowConfig(){{
setTenantId(wxMall.getTenantId());
}};
WxFlowConfig wxFlowConfig = new WxFlowConfig();
wxFlowConfig.setTenantId(wxMall.getTenantId());
List<WxFlowConfig> wxFlowConfigList = wxFlowConfigService.findList(wxFlowConfig); List<WxFlowConfig> wxFlowConfigList = wxFlowConfigService.findList(wxFlowConfig);
map.put("wxFlowConfigList",wxFlowConfigList); map.put("wxFlowConfigList",wxFlowConfigList);
TenantEntity tenantEntity = new TenantEntity() {{
setTenantId(wxMall.getTenantId());
}};
TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(wxMall.getTenantId());
ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity); ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity);
map.put("wxMallBuildingFloorList",wxMallBuildingFloorList.data); map.put("wxMallBuildingFloorList",wxMallBuildingFloorList.data);
WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId());
map.put("wxPayAccount",wxPayAccount); map.put("wxPayAccount",wxPayAccount);
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId());
map.put("wxPayAccountBill",wxPayAccountBill); map.put("wxPayAccountBill",wxPayAccountBill);
WxAppinfo wxAppinfo = new WxAppinfo() {{
setTenantId(wxMall.getTenantId());
}};
WxAppinfo wxAppinfo = new WxAppinfo();
wxAppinfo.setTenantId(wxMall.getTenantId());
List<WxAppinfo> wxAppinfoList = wxAppinfoService.getList(wxAppinfo); List<WxAppinfo> wxAppinfoList = wxAppinfoService.getList(wxAppinfo);
map.put("wxAppinfoList",wxAppinfoList); map.put("wxAppinfoList",wxAppinfoList);
MallUserInfo mallUserInfo = new MallUserInfo() {{
setTenantId(wxMall.getTenantId());
setIsAdmin(1);
}};
MallUserInfo mallUserInfo = new MallUserInfo();
mallUserInfo.setTenantId(wxMall.getTenantId());
mallUserInfo. setIsAdmin(1);
List<MallUserInfo> mallUserInfoList = mallUserInfoService.findList(mallUserInfo); List<MallUserInfo> mallUserInfoList = mallUserInfoService.findList(mallUserInfo);
map.put("mallUserInfoList",mallUserInfoList); map.put("mallUserInfoList",mallUserInfoList);
WxMsgConfig wxMsgConfig = new WxMsgConfig() {{
setTenantId(wxMall.getTenantId());
}};
WxMsgConfig wxMsgConfig = new WxMsgConfig();
wxMsgConfig.setTenantId(wxMall.getTenantId());
WxMsgConfig wxMsgConfigObject = wxMsgConfigService.findObject(wxMsgConfig); WxMsgConfig wxMsgConfigObject = wxMsgConfigService.findObject(wxMsgConfig);
map.put("wxMsgConfig",wxMsgConfigObject); map.put("wxMsgConfig",wxMsgConfigObject);
WxPark wxPark = new WxPark(){{
setTenantId(wxMall.getTenantId());
}};
WxPark wxPark = new WxPark();
wxPark.setTenantId(wxMall.getTenantId());
WxPark wxParkObj = wxParkService.getByObj(wxPark); WxPark wxParkObj = wxParkService.getByObj(wxPark);
map.put("wxPark",wxParkObj); map.put("wxPark",wxParkObj);
WxWiWideInfo wxWiWideInfo = new WxWiWideInfo(){{
setTenantId(wxMall.getTenantId());
}};
WxWiWideInfo wxWiWideInfo = new WxWiWideInfo();
wxWiWideInfo.setTenantId(wxMall.getTenantId());
WxWiWideInfo wxWiWideInfoObject = wxWiWideInfoService.findObject(wxWiWideInfo); WxWiWideInfo wxWiWideInfoObject = wxWiWideInfoService.findObject(wxWiWideInfo);
map.put("wxWiWideInfo",wxWiWideInfoObject); map.put("wxWiWideInfo",wxWiWideInfoObject);
WxWeappInfo wxWeappInfo = new WxWeappInfo(){{
setTenantId(wxMall.getTenantId());
}};
WxWeappInfo wxWeappInfo = new WxWeappInfo();
wxWeappInfo.setTenantId(wxMall.getTenantId());
List<WxWeappInfo> wxAuthorizerInfoList = wxAuthorizerInfoService.getList(wxWeappInfo); List<WxWeappInfo> wxAuthorizerInfoList = wxAuthorizerInfoService.getList(wxWeappInfo);
map.put("wxAuthorizerInfoList",wxAuthorizerInfoList); map.put("wxAuthorizerInfoList",wxAuthorizerInfoList);


@@ -652,10 +650,9 @@ public class WxProjectConfigController extends BaseController {
// if(subTenantIds == null || subTenantIds.length == 0){ // if(subTenantIds == null || subTenantIds.length == 0){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); // return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
// } // }
TenantEntity TenantEntity = new TenantEntity(){{
setTenantId(tenantId);
}};
WxMall parentWxMall = wxMallService.getByTenantInfo(TenantEntity);
TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(tenantId);
WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity);
if(parentWxMall == null || parentWxMall.getSaleType() != 100 if(parentWxMall == null || parentWxMall.getSaleType() != 100
|| !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
|| StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){


+ 2
- 2
mallinkAdmin/src/main/java/com/iformall/controller/mem/WxCreditHistoryController.java Прегледај датотеку

@@ -138,10 +138,10 @@ public class WxCreditHistoryController extends BaseController {




@ApiOperation("积分清零计划") @ApiOperation("积分清零计划")
@GetMapping("clearCreditByYear")
@PostMapping("clearCreditByYear")
@SystemControllerLog(description = "积分清零计划") @SystemControllerLog(description = "积分清零计划")
@TenantIgnore @TenantIgnore
public ResultData clearCreditByYear(@ModelAttribute WxCreditHistory wxCreditHistory) {
public ResultData clearCreditByYear(@RequestBody WxCreditHistory wxCreditHistory) {
logger.debug("[" + getIpAddr() + "] WxCreditHistoryController::clearCreditByYear"); logger.debug("[" + getIpAddr() + "] WxCreditHistoryController::clearCreditByYear");
if(wxCreditHistory == null){ if(wxCreditHistory == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL) ; return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL) ;


+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCreditHistoryMapper.java Прегледај датотеку

@@ -33,6 +33,6 @@ public interface WxCreditHistoryMapper extends CommonMapper<WxCreditHistory, Lon
int deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); int deleteById(@Param("id")Long id,@Param("tenantId")String tenantId);


void userCreditClear(@Param("cutOffDate")String cutOffDate,@Param("finalTableIndex")String finalTableIndex);


void userCreditClear(@Param("cutOffDate")String cutOffDate,@Param("finalTableIndex")String finalTableIndex);
} }

+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java Прегледај датотеку

@@ -60,6 +60,9 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
@Autowired @Autowired
WxCUserBasicInfoMapper wxCUserBasicInfoMapper; WxCUserBasicInfoMapper wxCUserBasicInfoMapper;


@Autowired
WxProjectConfigMapper wxProjectConfigMapper;

@Autowired @Autowired
WxMerchantBUserMapper wxMerchantBUserMapper; WxMerchantBUserMapper wxMerchantBUserMapper;


@@ -99,14 +102,13 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
/** /**
* @param * @param
*/ */
@Async
@Override @Override
public void clearCreditByYear(WxCreditHistory wxCreditHistory) { public void clearCreditByYear(WxCreditHistory wxCreditHistory) {
if(wxCreditHistory.getEndTime() == null){ if(wxCreditHistory.getEndTime() == null){
wxCreditHistory.setEndTime(new Date()); wxCreditHistory.setEndTime(new Date());
} }
String tableSuffix = "_" + Integer.parseInt(wxCreditHistory.getFinalTenantId())%100; String tableSuffix = "_" + Integer.parseInt(wxCreditHistory.getFinalTenantId())%100;
logger.info("---------"+dateFormat.format(wxCreditHistory.getEndTime())+"---"+tableSuffix);
wxCreditHistoryMapper.userCreditClear(dateFormat.format(wxCreditHistory.getEndTime()),tableSuffix); wxCreditHistoryMapper.userCreditClear(dateFormat.format(wxCreditHistory.getEndTime()),tableSuffix);


} }


+ 0
- 1
mallinkService/src/main/resources/mapper/WxCreditHistoryMapper.xml Прегледај датотеку

@@ -262,7 +262,6 @@
delete from wx_credit_history where id = #{id} and tenant_id = #{tenantId} delete from wx_credit_history where id = #{id} and tenant_id = #{tenantId}
</delete> </delete>



<update id="userCreditClear" statementType="CALLABLE" > <update id="userCreditClear" statementType="CALLABLE" >
{call user_credit_clear(#{cutOffDate},#{finalTableIndex})} {call user_credit_clear(#{cutOffDate},#{finalTableIndex})}
</update> </update>


+ 4
- 4
mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java Прегледај датотеку

@@ -94,10 +94,10 @@ public class ShardingSpherePlugin implements MyBatisPlus {
//if (method != null) { //if (method != null) {
// IgnoreSharding ignore = method.getAnnotation(IgnoreSharding.class); // IgnoreSharding ignore = method.getAnnotation(IgnoreSharding.class);
// if (null == ignore) { // if (null == ignore) {
Object parameterObject = metaStatementHandler.getValue("delegate.boundSql.parameterObject");
BoundSql boundSql = statementHandler.getBoundSql();
String newSQL = buildTable(boundSql,parameterObject,chainMap);
metaStatementHandler.setValue("delegate.boundSql.sql", newSQL);
// Object parameterObject = metaStatementHandler.getValue("delegate.boundSql.parameterObject");
// BoundSql boundSql = statementHandler.getBoundSql();
// String newSQL = buildTable(boundSql,parameterObject,chainMap);
// metaStatementHandler.setValue("delegate.boundSql.sql", newSQL);
// } // }
//} //}
//没有添加字段,只是根据字段分表,没有别的需要返回 //没有添加字段,只是根据字段分表,没有别的需要返回


Loading…
Откажи
Сачувај