| @@ -6,6 +6,7 @@ import java.util.Date; | |||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import com.simple.enums.EnumAppType; | |||||
| import org.apache.log4j.Logger; | import org.apache.log4j.Logger; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.http.HttpEntity; | import org.springframework.http.HttpEntity; | ||||
| @@ -55,7 +56,7 @@ public class WxAppVisitSchedule { | |||||
| String yesterday = new SimpleDateFormat("yyyyMMdd").format(time); | String yesterday = new SimpleDateFormat("yyyyMMdd").format(time); | ||||
| // "wx8eb8275b78db4ede", "76c43df01296998d8ce12383f213ac10"; | // "wx8eb8275b78db4ede", "76c43df01296998d8ce12383f213ac10"; | ||||
| WxAppinfo appInfo = new WxAppinfo(); | WxAppinfo appInfo = new WxAppinfo(); | ||||
| appInfo.setType(2); | |||||
| appInfo.setType(EnumAppType.C.getCode()); | |||||
| PageInfo<WxAppinfo> page = WxAppinfoService.listAsPage(appInfo, 1, 10000); | PageInfo<WxAppinfo> page = WxAppinfoService.listAsPage(appInfo, 1, 10000); | ||||
| for(WxAppinfo w :page.getList()) { | for(WxAppinfo w :page.getList()) { | ||||
| w.getAppId(); | w.getAppId(); | ||||
| @@ -0,0 +1,38 @@ | |||||
| package com.simple.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumAppType { | |||||
| // 1-B端, 2-C端 | |||||
| B(1, "B端"), | |||||
| C(2, "C端") | |||||
| ; | |||||
| public static EnumAppType getEnum(Integer code) { | |||||
| for (EnumAppType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumAppType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.simple.common.IdWorker; | import com.simple.common.IdWorker; | ||||
| import com.simple.domain.po.*; | import com.simple.domain.po.*; | ||||
| import com.simple.enums.EnumAppType; | |||||
| import com.simple.enums.EnumCarVendor; | import com.simple.enums.EnumCarVendor; | ||||
| import com.simple.mapper.*; | import com.simple.mapper.*; | ||||
| import com.simple.service.WxMerchantService; | import com.simple.service.WxMerchantService; | ||||
| @@ -87,7 +88,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| WxAppinfo wxAppinfo = new WxAppinfo(); | WxAppinfo wxAppinfo = new WxAppinfo(); | ||||
| wxAppinfo.setTenantId(wxMerchant.getTenantId()); | wxAppinfo.setTenantId(wxMerchant.getTenantId()); | ||||
| wxAppinfo.setType(1); | |||||
| wxAppinfo.setType(EnumAppType.B.getCode()); | |||||
| wxAppinfo = wxAppinfoMapper.findList(wxAppinfo).get(0); | wxAppinfo = wxAppinfoMapper.findList(wxAppinfo).get(0); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||