|
@@ -55,6 +55,7 @@ import com.ssj.bean.sys.fx.domain.MerchantArea;
|
|
|
import com.ssj.bean.sys.fx.domain.MerchantSign;
|
|
|
import com.ssj.bean.sys.organization.domain.Organization;
|
|
|
import com.ssj.bean.sys.role.domain.Admin;
|
|
|
+import com.ssj.bean.weixin.libmy.domain.LibVip;
|
|
|
import com.ssj.bean.weixin.libmy.domain.TbLibJoin;
|
|
|
import com.ssj.bean.weixin.libmy.domain.TbLibJoinConsume;
|
|
|
import com.ssj.bean.weixin.problem.domain.CnArea;
|
|
@@ -64,6 +65,7 @@ import com.ssj.framework.core.common.controller.BaseController;
|
|
|
import com.ssj.framework.core.util.PropertiesUtil;
|
|
|
import com.ssj.framework.core.util.ResponseConstant;
|
|
|
import com.ssj.framework.core.util.ResponseEntity;
|
|
|
+import com.ssj.framework.core.util.SystemResourceLocator;
|
|
|
import com.ssj.framework.core.util.WebUtil;
|
|
|
import com.ssj.framework.files.service.FileInfoService;
|
|
|
import com.ssj.framework.idworker.IdWorker;
|
|
@@ -330,6 +332,7 @@ public class FxController extends BaseController {
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("LIKE_unitName", request.getParameter("LIKE_unitName")==null?"":request.getParameter("LIKE_unitName"));
|
|
|
params.put("LIKE_posCode", request.getParameter("LIKE_posCode")==null?"":request.getParameter("LIKE_posCode"));
|
|
|
+ params.put("NOT_status", 4);
|
|
|
|
|
|
String orgCode=request.getParameter("LIKE_orgCode")==null?"":request.getParameter("LIKE_orgCode");
|
|
|
if(StringUtils.isNotEmpty(orgCode)) {
|
|
@@ -1678,6 +1681,7 @@ public class FxController extends BaseController {
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("LIKE_unitName", request.getParameter("unitName")==null?"":request.getParameter("unitName"));
|
|
|
params.put("LIKE_posCode", request.getParameter("posCode")==null?"":request.getParameter("posCode"));
|
|
|
+ params.put("NOT_status", 4);
|
|
|
|
|
|
if(!"SSJ-Fx".equals(merchant.getOrgCode())) {
|
|
|
params.put("LIKE_orgCode", merchant.getOrgCode());
|
|
@@ -2805,4 +2809,64 @@ public class FxController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ //手动测试运行结算定时任务
|
|
|
+ @RequestMapping("/run")
|
|
|
+ @ResponseBody
|
|
|
+ public Response run(Model model)throws Exception {
|
|
|
+ Response response = new Response();
|
|
|
+ System.out.println("【套餐模式】处理套餐的数据定时任务,开始...");
|
|
|
+ merchantSignService.runMerchantSignByEndTime();
|
|
|
+ System.out.println("【套餐模式】处理套餐的数据定时任务,结束。");
|
|
|
+ response.success("成功");
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ //手动测试运行激活任务
|
|
|
+ @RequestMapping("/runAc")
|
|
|
+ @ResponseBody
|
|
|
+ public Response runAc(Model model,String libId)throws Exception {
|
|
|
+ Response response = new Response();
|
|
|
+ try {
|
|
|
+ Merchant merchant = null;
|
|
|
+ if (StringUtils.isNotEmpty(libId)) {
|
|
|
+ merchant = merchantService.getMerchantByLibId(libId);
|
|
|
+ if(merchant!=null) {
|
|
|
+ //旧模式,都会记录所有的消费记录,新模式一次性记录消费的
|
|
|
+ if(merchant.getSignType()==1) {
|
|
|
+
|
|
|
+ }else {
|
|
|
+ //如果还没结算过,就当次开始结算
|
|
|
+ if(merchant.getLibServiceMonth()>0 && (merchant.getCurIsSummary()==null || merchant.getCurIsSummary()==0)) {
|
|
|
+ merchant.setCurIsSummary(1);
|
|
|
+ merchant.setCurSummaryTime(new Date());
|
|
|
+ merchant.setNextSummaryTime(DateHelper.getMonthDate(merchant.getCurSummaryTime(),1));
|
|
|
+ merchantService.save(merchant);
|
|
|
+
|
|
|
+ TbLibJoinConsume consume = new TbLibJoinConsume();
|
|
|
+ consume.setFromLibId(libId);
|
|
|
+ consume.setFromMerchantId(merchant.getId());
|
|
|
+ consume.setLibService(merchant.getLibService());
|
|
|
+ consume.setPlatformService(0);
|
|
|
+ consume.setType(2);
|
|
|
+ consume.setRemarks("消费【新模式激活消费】");
|
|
|
+ consume.setCreateTime(new Date());
|
|
|
+ libJoinConsumeService.save(consume);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ response.success("成功");
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|