| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <classpath>
|
| | | <classpathentry kind="src" path="src/main/resource"/>
|
| | | <classpathentry kind="src" output="target/classes" path="src/main/java">
|
| | | <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resource">
|
| | | <attributes>
|
| | | <attribute name="maven.pomderived" value="true"/>
|
| | | </attributes>
|
| | | </classpathentry>
|
| | | <classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
|
| | | <attributes>
|
| | | <attribute name="optional" value="true"/>
|
| | | <attribute name="maven.pomderived" value="true"/>
|
| | |
| | | <attributes>
|
| | | <attribute name="optional" value="true"/>
|
| | | <attribute name="maven.pomderived" value="true"/>
|
| | | <attribute name="test" value="true"/>
|
| | | </attributes>
|
| | | </classpathentry>
|
| | | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
| | |
| | | </arguments>
|
| | | </buildCommand>
|
| | | <buildCommand>
|
| | | <name>org.eclipse.m2e.core.maven2Builder</name>
|
| | | <name>org.eclipse.wst.validation.validationbuilder</name>
|
| | | <arguments>
|
| | | </arguments>
|
| | | </buildCommand>
|
| | | <buildCommand>
|
| | | <name>org.eclipse.wst.validation.validationbuilder</name>
|
| | | <name>org.eclipse.m2e.core.maven2Builder</name>
|
| | | <arguments>
|
| | | </arguments>
|
| | | </buildCommand>
|
| | |
| | |
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
|
| | |
|
| | | // @Around(EDP)
|
| | | @Around(EDP)
|
| | | public Object activeAround(ProceedingJoinPoint joinPoint) throws Throwable {
|
| | |
|
| | | Long uid = null;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // 缓存uid的Key
|
| | | String key = "activeUid_" + uuid;
|
| | | |
| | | // 缓存中是否存在uid
|
| | | String cacheValue = redisManager.getCommonString(key);
|
| | | if (cacheValue != null && cacheValue.trim().length() > 0) {
|
| | | return;
|
| | | }
|
| | |
|
| | | // 加入缓存 20分钟
|
| | | redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20);
|
| | | |
| | | // // 缓存uid的Key
|
| | | // String key = "activeUid_" + uuid;
|
| | | // |
| | | // // 缓存中是否存在uid
|
| | | // String cacheValue = redisManager.getCommonString(key);
|
| | | // if (cacheValue != null && cacheValue.trim().length() > 0) {
|
| | | // return;
|
| | | // }
|
| | | //
|
| | | // // 加入缓存 20分钟
|
| | | // redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20);
|
| | | // |
| | |
|
| | | // 接收券
|
| | | try {
|
| | |
| | | import org.aspectj.lang.ProceedingJoinPoint;
|
| | | import org.aspectj.lang.annotation.Around;
|
| | | import org.aspectj.lang.annotation.Aspect;
|
| | | import org.springframework.core.annotation.Order;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.web.context.request.RequestContextHolder;
|
| | | import org.springframework.web.context.request.ServletRequestAttributes;
|
| | |
| | | //客户端接口签名验证
|
| | | @Component
|
| | | @Aspect
|
| | | @Order(2)
|
| | | public class SignValidateAspect {
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
|
| | |
|
| | |
| | | // return null;
|
| | | // }
|
| | | //uid
|
| | | |
| | |
|
| | | Object obj = null;
|
| | | try {
|
| | |
| | | package com.yeshi.fanli.controller.admin;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushGoodsAll_f", method = RequestMethod.POST)
|
| | | public void pushGoods(Long uId, String url, String title, String content, PrintWriter out) throws Exception {
|
| | | String auctionId = null;
|
| | | if (!StringUtil.isNullOrEmpty(url) && url.contains("id=")) {
|
| | | String[] sts = url.split("\\?")[1].split("&");
|
| | | for (String st : sts)
|
| | | if (st.contains("id=")) {
|
| | | auctionId = st.replace("id=", "");
|
| | | }
|
| | | }
|
| | | public void pushGoods(Long uId, String url, String title, String content, String versions, PrintWriter out) throws Exception {
|
| | | try {
|
| | | String auctionId = null;
|
| | | if (!StringUtil.isNullOrEmpty(url) && url.contains("id=")) {
|
| | | String[] sts = url.split("\\?")[1].split("&");
|
| | | for (String st : sts)
|
| | | if (st.contains("id=")) {
|
| | | auctionId = st.replace("id=", "");
|
| | | }
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(auctionId)) {
|
| | | out.print(JsonUtil.loadFalseResult("提取商品ID失败"));
|
| | | return;
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(auctionId)) {
|
| | | out.print(JsonUtil.loadFalseResult("提取商品ID失败"));
|
| | | return;
|
| | | }
|
| | |
|
| | | JSONObject json = IOSPushFactory.createGoodsPush(Long.parseLong(auctionId), title, content);
|
| | | if (json.toString().getBytes().length > 256) {
|
| | | out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
|
| | | return;
|
| | | }
|
| | | JSONObject json = IOSPushFactory.createGoodsPush(Long.parseLong(auctionId), title, content);
|
| | | if (json.toString().getBytes().length > 256) {
|
| | | out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
|
| | | return;
|
| | | }
|
| | |
|
| | | pushService.pushGoods(uId, url, title, content);
|
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | pushService.pushGoods(uId, url, title, content, listVersion);
|
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | } catch (PushException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("推送失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushUrlAll_f", method = RequestMethod.POST)
|
| | | public void pushUrl(String url, String title, String content, PrintWriter out) throws Exception {
|
| | | public void pushUrl(String url, String title, String content, String versions, PrintWriter out) throws Exception {
|
| | | if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | | out.print(JsonUtil.loadFalseResult("请填写链接,标题与内容"));
|
| | | return;
|
| | |
| | | out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
|
| | | return;
|
| | | }
|
| | | pushService.pushUrl(null, url, title, content);
|
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | |
| | | try {
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | pushService.pushUrl(null, url, title, content, listVersion);
|
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | } catch (PushException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("推送失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushFanZNX_f", method = RequestMethod.POST)
|
| | | public void pushSystemZnx(Long uId, String title, String content, PrintWriter out) throws Exception {
|
| | | pushService.pushZNX(uId, title, content);
|
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | public void pushSystemZnx(Long uId, String title, String content, String versions, PrintWriter out) throws Exception {
|
| | | try {
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | pushService.pushZNX(uId, title, content, listVersion);
|
| | | |
| | | out.print(JsonUtil.loadTrueResult("推送成功"));
|
| | | } catch (PushException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("推送失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushGoodsAll")
|
| | | public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, PrintWriter out)
|
| | | public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, String versions, PrintWriter out)
|
| | | throws Exception {
|
| | |
|
| | | String auctionId = null;
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | pushService.pushGoods(uid, url, title, content);
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | pushService.pushGoods(uid, url, title, content, listVersion);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("推送成功"));
|
| | | } catch (PushException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("推送失败"));
|
| | | e.printStackTrace();
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushUrlAll")
|
| | | public void newPushUrlAll(String callback, String url, String title, String content, PrintWriter out) {
|
| | | public void newPushUrlAll(String callback, String url, String title, String content, String versions, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写链接,标题与内容"));
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | pushService.pushUrl(null, url, title, content);
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | pushService.pushUrl(null, url, title, content, listVersion);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("推送成功"));
|
| | | } catch (PushException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("推送失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushFanZNX")
|
| | | public void newPushFanZNX(String callback, String uids, String title, String content, PrintWriter out) {
|
| | | public void newPushFanZNX(String callback, String uids, String title, String content, String versions, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写标题与内容"));
|
| | |
| | | if (uids != null) {
|
| | | uidArray = uids.split(",");
|
| | | }
|
| | |
|
| | | |
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | if (uidArray == null) {
|
| | | pushService.pushZNX(null, title, content);
|
| | | pushService.pushZNX(null, title, content, listVersion);
|
| | | } else {
|
| | | for (int i = 0; i < uidArray.length; i++) {
|
| | | String str_uid = uidArray[i];
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content);
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content, listVersion);
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), UserSystemMsgTypeEnum.question,
|
| | | title, content, UserSystemMsg.TIME_TAG_EMERGENT, null);
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushBaiChuan")
|
| | | public void pushBaiChuan(String callback, String uids, String title, String content, String url, PrintWriter out) {
|
| | | public void pushBaiChuan(String callback, String uids, String title, String content, String url, String versions, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写标题与内容"));
|
| | |
| | | uidArray = uids.split(",");
|
| | | }
|
| | |
|
| | | List<String> listVersion = null;
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | if (uidArray == null) {
|
| | | pushService.pushBaiChuanUrl(null, title, content, url);
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listVersion);
|
| | | } else {
|
| | | for (int i = 0; i < uidArray.length; i++) {
|
| | | String str_uid = uidArray[i];
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url);
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listVersion);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * 加入精选库商品
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param key
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.factory.AccountDetailsFactory;
|
| | | import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserRankService userRankService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserMoneyDetailService userMoneyDetailService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 查询封禁
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @param type
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "forbiddenQuery")
|
| | | public void forbiddenQuery(String callback, Integer pageIndex, Integer pageSize, String key, Integer type, PrintWriter out) {
|
| | |
|
| | | try {
|
| | |
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | |
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | |
| | | List<ForbiddenUserIdentifyCodeVO> list = forbiddenUserIdentifyCodeService.listQuery((pageIndex - 1) * pageSize, |
| | | pageSize, key, type);
|
| | | |
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无相关数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = forbiddenUserIdentifyCodeService.countQuery(key, type);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls();
|
| | | Gson gson = gsonBuilder.create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 用户账号- 封禁/解封 |
| | | * @param callback
|
| | | * @param code
|
| | | * @param type 1("微信unionId"), 2("淘宝ID"), 3("手机号"), 4("支付宝账号");
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveForbiddenInfo")
|
| | | public void saveForbiddenInfo(String callback, String code, Integer type, boolean state, PrintWriter out) {
|
| | | try {
|
| | | if (code == null || code.trim().length() == 0 || type == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空"));
|
| | | }
|
| | | |
| | | forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type, state);
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功"));
|
| | |
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | }
|
| | |
| | | record.setOrder(maxOrder + 1);
|
| | | // 默认停用
|
| | | record.setState(1);
|
| | | record.setAutoControl(1);
|
| | | record.setCreatetime(new Date());
|
| | | record.setUpdatetime(new Date());
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | SwiperPicture resultObj = swiperPictureService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | String params = record.getParams();
|
| | | String remark = record.getRemark();
|
| | | if (StringUtil.isNullOrEmpty(params) && StringUtil.isNullOrEmpty(jumpType)
|
| | | && StringUtil.isNullOrEmpty(remark)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作内容不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(params)) {
|
| | | |
| | | String jumpValue = systemConfigService.get("jump");
|
| | | if (StringUtil.isNullOrEmpty(jumpValue)) {
|
| | | jumpValue = "{\"url\":\"#\"}";
|
| | | }
|
| | | |
| | | params = jumpValue.replace("#", params);
|
| | | record.setParams(params);
|
| | | }
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(jumpType)) {
|
| | | List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
|
| | | if (listByType !=null && listByType.size() > 0) {
|
| | | record.setJumpDetail(listByType.get(0));
|
| | | } |
| | | }
|
| | | |
| | | swiperPictureService.updateByPrimaryKeySelective(record);
|
| | | swiperPictureService.save(record);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | |
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 更新自动控制状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateAutoControl")
|
| | | public void updateAutoControl(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | SwiperPicture resultObj = swiperPictureService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | Integer state = resultObj.getAutoControl();
|
| | | if (state == null || state.equals(1) || state == 1) {
|
| | | resultObj.setAutoControl(0);
|
| | | } else {
|
| | | resultObj.setAutoControl(1);
|
| | | }
|
| | |
|
| | | swiperPictureService.updateByPrimaryKeySelective(resultObj);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", resultObj.getState());
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (SwiperPictureException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 解绑推送
|
| | | * 商品推送记录
|
| | | *
|
| | | * @param acceptData
|
| | | * @param out
|
| | |
| | | */ |
| | | UserInfo getInfoByPhoneOrInviteCode(@Param("phone")String phone, @Param("inviteCode")String inviteCode); |
| | | |
| | | |
| | | |
| | | // 根据AppId与电话号码获取用户 |
| | | List<UserInfo> listByClosed(@Param("appId") String appId, @Param("phone") String phone); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | DeviceTokenIOS selectByDeviceToken(String deviceToken); |
| | | |
| | | List<DeviceTokenIOS> selectByUid(Long uid); |
| | | List<DeviceTokenIOS> selectByUid( @Param("uid")Long uid, @Param("list")List<Integer> list); |
| | | |
| | | List<DeviceTokenIOS> selectList(@Param("start")Long start,@Param("count")int count); |
| | | List<DeviceTokenIOS> selectList(@Param("start")Long start,@Param("count")int count, @Param("array")String[] arrayVersion); |
| | | |
| | | long selectCount(); |
| | | |
| | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode; |
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum; |
| | | import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO; |
| | | |
| | | public interface ForbiddenUserIdentifyCodeMapper extends BaseMapper<ForbiddenUserIdentifyCode> { |
| | | |
| | |
| | | */ |
| | | List<ForbiddenUserIdentifyCode> listByTypeAndIdentifyCode(@Param("type") ForbiddenUserIdentifyCodeTypeEnum type, |
| | | @Param("identifyCode") String identifyCode); |
| | | |
| | | |
| | | /** |
| | | * 查询封禁记录 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | List<ForbiddenUserIdentifyCodeVO> listQuery(@Param("start") long start, @Param("count") int count, |
| | | @Param("key") String key, @Param("type") Integer type); |
| | | |
| | | |
| | | long countQuery(@Param("key") String key, @Param("type") Integer type); |
| | | |
| | | } |
| | |
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.springframework.format.annotation.DateTimeFormat;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | |
|
| | | /**
|
| | | * 轮播图 图片管理
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_swiper_banner_picture")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_swiper_banner_picture")
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "pic_id")
|
| | | private Long id;
|
| | |
|
| | | // 轮播图标识ID
|
| | | @JoinColumn(name = "pic_banner_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_banner_id")
|
| | | private Long bannerId;
|
| | |
|
| | | // 图片链接
|
| | | @Expose
|
| | | @JoinColumn(name = "pic_src")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_src")
|
| | | private String src;
|
| | |
|
| | | // 跳转方式
|
| | | @Expose
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "pic_jumpid")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_jumpid")
|
| | | private JumpDetailV2 jumpDetail;
|
| | |
|
| | | |
| | | // 跳转参数
|
| | | @Expose
|
| | | @JoinColumn(name = "pic_params")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_params")
|
| | | private String params;
|
| | | |
| | | // 跳转是否需要登陆
|
| | | @JoinColumn(name = "pic_jump_need_login")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_jump_need_login")
|
| | | private boolean jumpNeedLogin;
|
| | | |
| | | // 显示状态:everyday每天展示一次 、always 每次打开首页都展示
|
| | | @Expose
|
| | | @JoinColumn(name = "pic_show_state")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_show_state")
|
| | | private String showState;
|
| | |
|
| | | // 排序
|
| | | @JoinColumn(name = "pic_order")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_order")
|
| | | private Integer order;
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "pic_remark")
|
| | | private String remark;
|
| | |
|
| | | // 启用状态
|
| | | @JoinColumn(name = "pic_state")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_state")
|
| | | private Integer state;
|
| | |
|
| | | // 自动控制
|
| | | @JoinColumn(name = "pic_auto_control")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_auto_control")
|
| | | private Integer autoControl;
|
| | |
|
| | | |
| | | // 起始时间
|
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
| | | @JoinColumn(name = "pic_start_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_start_time")
|
| | | private Date startTime;
|
| | | |
| | | // 结束时间
|
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
| | | @JoinColumn(name = "pic_end_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_end_time")
|
| | | private Date endTime;
|
| | |
|
| | | @JoinColumn(name = "pic_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "pic_createtime")
|
| | |
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public Integer getAutoControl() {
|
| | | return autoControl;
|
| | | }
|
| | |
|
| | | public void setAutoControl(Integer autoControl) {
|
| | | this.autoControl = autoControl;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getEndTime() {
|
| | | return endTime;
|
| | | }
|
| | |
|
| | | public void setEndTime(Date endTime) {
|
| | | this.endTime = endTime;
|
| | | }
|
| | |
|
| | | public boolean isJumpNeedLogin() {
|
| | | return jumpNeedLogin;
|
| | | }
|
| | |
|
| | | public void setJumpNeedLogin(boolean jumpNeedLogin) {
|
| | | this.jumpNeedLogin = jumpNeedLogin;
|
| | | }
|
| | |
|
| | | public String getShowState() {
|
| | | return showState;
|
| | | }
|
| | |
|
| | | public void setShowState(String showState) {
|
| | | this.showState = showState;
|
| | | }
|
| | | |
| | | |
| | | } |
| | |
| | | @Column(name = "pc_uids")
|
| | | private String uids;
|
| | |
|
| | | // 版本号
|
| | | @Column(name = "pc_versions")
|
| | | private String versions;
|
| | | |
| | | // 单推用户id
|
| | | @Column(name = "pc_remark")
|
| | | private String remark;
|
| | |
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public String getVersions() {
|
| | | return versions;
|
| | | }
|
| | |
|
| | | public void setVersions(String versions) {
|
| | | this.versions = versions;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | private String picture;
|
| | |
|
| | | // 推送用户id 使用于单推
|
| | | @Column(name = "pg_uid")
|
| | | // @Column(name = "pg_uid")
|
| | | private Long uid;
|
| | | |
| | | @Column(name = "pg_versions")
|
| | | private String versions;
|
| | |
|
| | | // 是否已推送
|
| | | @Column(name = "pg_is_push")
|
| | |
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public Long getCountGoods() {
|
| | | return countGoods;
|
| | | }
|
| | |
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public String getVersions() {
|
| | | return versions;
|
| | | }
|
| | |
|
| | | public void setVersions(String versions) {
|
| | | this.versions = versions;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "qe_push_num")
|
| | | private Integer pushNum;
|
| | |
|
| | | /* 推送的版本号 */ |
| | | @Column(name="`qe_versions`")
|
| | | @org.yeshi.utils.mybatis.Column(name = "qe_versions")
|
| | | private String versions;
|
| | |
|
| | | /* 状态: 执行状态 :0 未执行 1执行完成 2执行失败 */
|
| | | @Column(name="`qe_state`")
|
| | |
| | | public void setEndtime(Date endtime) {
|
| | | this.endtime = endtime;
|
| | | }
|
| | |
|
| | | public String getVersions() {
|
| | | return versions;
|
| | | }
|
| | |
|
| | | public void setVersions(String versions) {
|
| | | this.versions = versions;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | <result column="pic_banner_id" property="bannerId" jdbcType="BIGINT"/> |
| | | <result column="pic_src" property="src" jdbcType="VARCHAR"/> |
| | | <result column="pic_params" property="params" jdbcType="VARCHAR"/> |
| | | <result column="pic_jump_need_login" property="jumpNeedLogin" jdbcType="VARCHAR"/> |
| | | <result column="pic_show_state" property="showState" jdbcType="VARCHAR"/> |
| | | <result column="pic_order" property="order" jdbcType="INTEGER"/> |
| | | <result column="pic_remark" property="remark" jdbcType="VARCHAR"/> |
| | | <result column="pic_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="pic_auto_control" property="autoControl" jdbcType="INTEGER"/> |
| | | <result column="pic_start_time" property="startTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pic_end_time" property="endTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pic_createtime" property="createtime" jdbcType="TIMESTAMP"/> |
| | | <result column="pic_updatetime" property="updatetime" jdbcType="TIMESTAMP"/> |
| | | |
| | | <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/> |
| | | |
| | | <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime</sql> |
| | | |
| | | <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{showState,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{autoControl,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">pic_id,</if> |
| | |
| | | <if test="src != null">pic_src,</if> |
| | | <if test="jumpDetail != null">pic_jumpid,</if> |
| | | <if test="params != null">pic_params,</if> |
| | | <if test="jumpNeedLogin != null">pic_jump_need_login,</if> |
| | | <if test="showState != null">pic_show_state,</if> |
| | | <if test="order != null">pic_order,</if> |
| | | <if test="remark != null">pic_remark,</if> |
| | | <if test="state != null">pic_state,</if> |
| | | <if test="autoControl != null">pic_auto_control,</if> |
| | | <if test="startTime != null">pic_start_time,</if> |
| | | <if test="endTime != null">pic_end_time,</if> |
| | | <if test="createtime != null">pic_createtime,</if> |
| | | <if test="updatetime != null">pic_updatetime,</if> |
| | | </trim>values |
| | |
| | | <if test="src != null">#{src,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if> |
| | | <if test="jumpNeedLogin != null">#{jumpNeedLogin,jdbcType=VARCHAR},</if> |
| | | <if test="showState != null">#{showState,jdbcType=VARCHAR},</if> |
| | | <if test="order != null">#{order,jdbcType=INTEGER},</if> |
| | | <if test="remark != null">#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="autoControl != null">#{autoControl,jdbcType=INTEGER},</if> |
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_jump_need_login = #{jumpNeedLogin,jdbcType=VARCHAR},pic_show_state = #{showState,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_auto_control = #{autoControl,jdbcType=INTEGER},pic_start_time = #{startTime,jdbcType=TIMESTAMP},pic_end_time = #{endTime,jdbcType=TIMESTAMP},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture |
| | | <set> |
| | | <if test="bannerId != null">pic_banner_id=#{bannerId,jdbcType=BIGINT},</if> |
| | | <if test="src != null">pic_src=#{src,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">pic_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">pic_params=#{params,jdbcType=VARCHAR},</if> |
| | | <if test="jumpNeedLogin != null">pic_jump_need_login=#{jumpNeedLogin,jdbcType=VARCHAR},</if> |
| | | <if test="showState != null">pic_show_state=#{showState,jdbcType=VARCHAR},</if> |
| | | <if test="order != null">pic_order=#{order,jdbcType=INTEGER},</if> |
| | | <if test="remark != null">pic_remark=#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">pic_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="autoControl != null">pic_auto_control=#{autoControl,jdbcType=INTEGER},</if> |
| | | <if test="startTime != null">pic_start_time=#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">pic_end_time=#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createtime != null">pic_createtime=#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">pic_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </set> where pic_id = #{id,jdbcType=BIGINT} |
| | |
| | | |
| | | <select id="getByBannerCard" resultMap="BaseResultMap"> |
| | | SELECT * FROM `yeshi_ec_swiper_banner` w |
| | | LEFT JOIN `yeshi_ec_swiper_banner_picture` p ON p.`pic_banner_id` = w.`sp_id` |
| | | LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid` |
| | | LEFT JOIN `yeshi_ec_swiper_banner_picture` p ON p.`pic_banner_id` = w.`sp_id` |
| | | LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid` |
| | | WHERE w.`sp_card` = #{card} AND w.`sp_state` = 0 AND p.`pic_state`= 0 |
| | | <![CDATA[AND IF(p.`pic_auto_control` = 1, p.`pic_start_time` <= NOW() AND p.`pic_end_time` >= NOW(),TRUE)]]> |
| | | ORDER BY p.`pic_order` |
| | | </select> |
| | | |
| | |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_uid_devicetoken_ios where uid = #{0} |
| | | from yeshi_ec_uid_devicetoken_ios WHERE uid = #{uid} |
| | | <if test="list != null and list.size() > 0"> |
| | | AND version in |
| | | <foreach collection="list" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="selectList" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_uid_devicetoken_ios limit #{start},#{count} |
| | | from yeshi_ec_uid_devicetoken_ios |
| | | <if test="array != null"> |
| | | WHERE version in |
| | | <foreach collection="array" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | limit #{start},#{count} |
| | | </select> |
| | | <select id="selectCount" resultType="java.lang.Long">select count(id) from |
| | | |
| | | <select id="selectCount" resultType="java.lang.Long"> |
| | | select count(id) from |
| | | yeshi_ec_uid_devicetoken_ios |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | |
| | | <result column="pc_amount" property="amount" jdbcType="INTEGER"/> |
| | | <result column="pc_percent" property="percent" jdbcType="DECIMAL"/> |
| | | <result column="pc_uids" property="uids" jdbcType="VARCHAR"/> |
| | | <result column="pc_versions" property="versions" jdbcType="VARCHAR"/> |
| | | <result column="pc_remark" property="remark" jdbcType="VARCHAR"/> |
| | | <result column="pc_start_time" property="startTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pc_end_time" property="endTime" jdbcType="TIMESTAMP"/> |
| | |
| | | <result column="pc_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pc_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time</sql> |
| | | <sql id="Base_Column_List">pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_versions,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_push_coupon where pc_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_coupon where pc_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon (pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{amount,jdbcType=INTEGER},#{percent,jdbcType=DECIMAL},#{uids,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{pushed,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon (pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_versions,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{amount,jdbcType=INTEGER},#{percent,jdbcType=DECIMAL},#{uids,jdbcType=VARCHAR},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{pushed,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">pc_id,</if> |
| | |
| | | <if test="amount != null">pc_amount,</if> |
| | | <if test="percent != null">pc_percent,</if> |
| | | <if test="uids != null">pc_uids,</if> |
| | | <if test="versions != null">pc_versions,</if> |
| | | <if test="remark != null">pc_remark,</if> |
| | | <if test="startTime != null">pc_start_time,</if> |
| | | <if test="endTime != null">pc_end_time,</if> |
| | |
| | | <if test="amount != null">#{amount,jdbcType=INTEGER},</if> |
| | | <if test="percent != null">#{percent,jdbcType=DECIMAL},</if> |
| | | <if test="uids != null">#{uids,jdbcType=VARCHAR},</if> |
| | | <if test="versions != null">#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon set pc_title = #{title,jdbcType=VARCHAR},pc_content = #{content,jdbcType=VARCHAR},pc_amount = #{amount,jdbcType=INTEGER},pc_percent = #{percent,jdbcType=DECIMAL},pc_uids = #{uids,jdbcType=VARCHAR},pc_remark = #{remark,jdbcType=VARCHAR},pc_start_time = #{startTime,jdbcType=TIMESTAMP},pc_end_time = #{endTime,jdbcType=TIMESTAMP},pc_pushed = #{pushed,jdbcType=VARCHAR},pc_push_time = #{pushTime,jdbcType=TIMESTAMP},pc_create_time = #{createTime,jdbcType=TIMESTAMP},pc_update_time = #{updateTime,jdbcType=TIMESTAMP} where pc_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon set pc_title = #{title,jdbcType=VARCHAR},pc_content = #{content,jdbcType=VARCHAR},pc_amount = #{amount,jdbcType=INTEGER},pc_percent = #{percent,jdbcType=DECIMAL},pc_uids = #{uids,jdbcType=VARCHAR},pc_versions = #{versions,jdbcType=VARCHAR},pc_remark = #{remark,jdbcType=VARCHAR},pc_start_time = #{startTime,jdbcType=TIMESTAMP},pc_end_time = #{endTime,jdbcType=TIMESTAMP},pc_pushed = #{pushed,jdbcType=VARCHAR},pc_push_time = #{pushTime,jdbcType=TIMESTAMP},pc_create_time = #{createTime,jdbcType=TIMESTAMP},pc_update_time = #{updateTime,jdbcType=TIMESTAMP} where pc_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon |
| | | <set> |
| | | <if test="title != null">pc_title=#{title,jdbcType=VARCHAR},</if> |
| | |
| | | <if test="amount != null">pc_amount=#{amount,jdbcType=INTEGER},</if> |
| | | <if test="percent != null">pc_percent=#{percent,jdbcType=DECIMAL},</if> |
| | | <if test="uids != null">pc_uids=#{uids,jdbcType=VARCHAR},</if> |
| | | <if test="versions != null">pc_versions=#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">pc_remark=#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="startTime != null">pc_start_time=#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">pc_end_time=#{endTime,jdbcType=TIMESTAMP},</if> |
| | |
| | | <if test="updateTime != null">pc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where pc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="listQuery" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_push_coupon |
| | | WHERE 1=1 |
| | |
| | | WHERE pc_pushed = 1 |
| | | AND DATE_FORMAT(CURDATE(),'%Y%m%d') <![CDATA[ <= ]]>DATE_FORMAT(pc_end_time,'%Y%m%d'); |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
| | |
| | | <result column="pg_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="pg_content" property="content" jdbcType="VARCHAR"/> |
| | | <result column="pg_picture" property="picture" jdbcType="VARCHAR"/> |
| | | <result column="pg_uid" property="uid" jdbcType="BIGINT"/> |
| | | <result column="pg_versions" property="versions" jdbcType="VARCHAR"/> |
| | | <result column="pg_is_push" property="isPush" jdbcType="VARCHAR"/> |
| | | <result column="pg_push_time" property="pushTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pg_createtime" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="pg_updatetime" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_is_push,pg_push_time,pg_createtime,pg_updatetime</sql> |
| | | <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_is_push,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{isPush,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{versions,jdbcType=VARCHAR},#{isPush,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">pg_id,</if> |
| | |
| | | <if test="title != null">pg_title,</if> |
| | | <if test="content != null">pg_content,</if> |
| | | <if test="picture != null">pg_picture,</if> |
| | | <if test="uid != null">pg_uid,</if> |
| | | <if test="versions != null">pg_versions,</if> |
| | | <if test="isPush != null">pg_is_push,</if> |
| | | <if test="pushTime != null">pg_push_time,</if> |
| | | <if test="createTime != null">pg_createtime,</if> |
| | |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">#{content,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="versions != null">#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="isPush != null">#{isPush,jdbcType=VARCHAR},</if> |
| | | <if test="pushTime != null">#{pushTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_is_push = #{isPush,jdbcType=VARCHAR},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_versions = #{versions,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=VARCHAR},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods |
| | | <set> |
| | | <if test="alertTitle != null">pg_alert_title=#{alertTitle,jdbcType=VARCHAR},</if> |
| | |
| | | <if test="title != null">pg_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">pg_content=#{content,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">pg_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">pg_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="versions != null">pg_versions=#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="isPush != null">pg_is_push=#{isPush,jdbcType=VARCHAR},</if> |
| | | <if test="pushTime != null">pg_push_time=#{pushTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createTime != null">pg_createtime=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">pg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where pg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List"> |
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List"> |
| | | delete from yeshi_ec_push_goods where pg_id in |
| | | <foreach item="item" collection="list" open="(" separator="," |
| | | close=")">#{item}</foreach> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.push.PushRecordMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.xinge.PushRecord"> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="url" property="url" jdbcType="VARCHAR" /> |
| | | <result column="type" property="type" jdbcType="INTEGER" /> |
| | | <result column="title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="state" property="state" jdbcType="INTEGER" /> |
| | | <result column="createtime" property="createtime" jdbcType="BIGINT" /> |
| | | <result column="count" property="count" jdbcType="BIGINT" /> |
| | | <result column="iosPushId" property="iosPushId" jdbcType="VARCHAR" /> |
| | | <result column="androidPushId" property="androidPushId" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="account" property="account" jdbcType="INTEGER" /> |
| | | <result column="appName" property="appName" jdbcType="VARCHAR" /> |
| | | <result column="uid" property="uid" jdbcType="BIGINT" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">id,url,type,title,state,createtime,count,iosPushId,androidPushId,account,appName,uid</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_push_record where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_push_record where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.xinge.PushRecord" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_record |
| | | (id,url,type,title,state,createtime,count,iosPushId,androidPushId,account,appName,uid) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{title,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=BIGINT},#{count,jdbcType=BIGINT},#{iosPushId,jdbcType=VARCHAR},#{androidPushId,jdbcType=VARCHAR},#{account,jdbcType=INTEGER},#{appName,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.xinge.PushRecord" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_push_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="url != null">url,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="title != null">title,</if> |
| | | <if test="state != null">state,</if> |
| | | <if test="createtime != null">createtime,</if> |
| | | <if test="count != null">count,</if> |
| | | <if test="iosPushId != null">iosPushId,</if> |
| | | <if test="androidPushId != null">androidPushId,</if> |
| | | <if test="account != null">account,</if> |
| | | <if test="appName != null">appName,</if> |
| | | <if test="uid != null">uid,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="url != null">#{url,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=BIGINT},</if> |
| | | <if test="count != null">#{count,jdbcType=BIGINT},</if> |
| | | <if test="iosPushId != null">#{iosPushId,jdbcType=VARCHAR},</if> |
| | | <if test="androidPushId != null">#{androidPushId,jdbcType=VARCHAR},</if> |
| | | <if test="account != null">#{account,jdbcType=INTEGER},</if> |
| | | <if test="appName != null">#{appName,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.xinge.PushRecord">update |
| | | yeshi_ec_push_record set url = #{url,jdbcType=VARCHAR},type = |
| | | #{type,jdbcType=INTEGER},title = #{title,jdbcType=VARCHAR},state = |
| | | #{state,jdbcType=INTEGER},createtime = |
| | | #{createtime,jdbcType=BIGINT},count = |
| | | #{count,jdbcType=BIGINT},iosPushId = |
| | | #{iosPushId,jdbcType=VARCHAR},androidPushId = |
| | | #{androidPushId,jdbcType=VARCHAR},account = |
| | | #{account,jdbcType=INTEGER},appName = #{appName,jdbcType=VARCHAR},uid |
| | | = #{uid,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.xinge.PushRecord"> |
| | | update yeshi_ec_push_record |
| | | <set> |
| | | <if test="url != null">url=#{url,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">type=#{type,jdbcType=INTEGER},</if> |
| | | <if test="title != null">title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">createtime=#{createtime,jdbcType=BIGINT},</if> |
| | | <if test="count != null">count=#{count,jdbcType=BIGINT},</if> |
| | | <if test="iosPushId != null">iosPushId=#{iosPushId,jdbcType=VARCHAR},</if> |
| | | <if test="androidPushId != null">androidPushId=#{androidPushId,jdbcType=VARCHAR},</if> |
| | | <if test="account != null">account=#{account,jdbcType=INTEGER},</if> |
| | | <if test="appName != null">appName=#{appName,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">uid=#{uid,jdbcType=BIGINT},</if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.push.PushQueueRecord"> |
| | | <id column="qe_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="qe_type" property="type" jdbcType="INTEGER"/> |
| | | <result column="qe_content" property="jsonContent" jdbcType="VARCHAR"/> |
| | | <result column="qe_start_cursor" property="startCursor" jdbcType="BIGINT"/> |
| | | <result column="qe_end_cursor" property="endCursor" jdbcType="BIGINT"/> |
| | | <result column="qe_record_cursor" property="recordCursor" jdbcType="BIGINT"/> |
| | | <result column="qe_push_num" property="pushNum" jdbcType="INTEGER"/> |
| | | <result column="qe_versions" property="versions" jdbcType="VARCHAR"/> |
| | | <result column="qe_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="qe_createtime" property="createtime" jdbcType="TIMESTAMP"/> |
| | | <result column="qe_endtime" property="endtime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">qe_id,qe_type,qe_content,qe_start_cursor,qe_end_cursor,qe_record_cursor,qe_push_num,qe_versions,qe_state,qe_createtime,qe_endtime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_push_queue where qe_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_queue where qe_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_queue (qe_id,qe_type,qe_content,qe_start_cursor,qe_end_cursor,qe_record_cursor,qe_push_num,qe_versions,qe_state,qe_createtime,qe_endtime) values (#{id,jdbcType=BIGINT},#{type,jdbcType=INTEGER},#{jsonContent,jdbcType=VARCHAR},#{startCursor,jdbcType=BIGINT},#{endCursor,jdbcType=BIGINT},#{recordCursor,jdbcType=BIGINT},#{pushNum,jdbcType=INTEGER},#{versions,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{endtime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_queue |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">qe_id,</if> |
| | | <if test="type != null">qe_type,</if> |
| | | <if test="jsonContent != null">qe_content,</if> |
| | | <if test="startCursor != null">qe_start_cursor,</if> |
| | | <if test="endCursor != null">qe_end_cursor,</if> |
| | | <if test="recordCursor != null">qe_record_cursor,</if> |
| | | <if test="pushNum != null">qe_push_num,</if> |
| | | <if test="versions != null">qe_versions,</if> |
| | | <if test="state != null">qe_state,</if> |
| | | <if test="createtime != null">qe_createtime,</if> |
| | | <if test="endtime != null">qe_endtime,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</if> |
| | | <if test="jsonContent != null">#{jsonContent,jdbcType=VARCHAR},</if> |
| | | <if test="startCursor != null">#{startCursor,jdbcType=BIGINT},</if> |
| | | <if test="endCursor != null">#{endCursor,jdbcType=BIGINT},</if> |
| | | <if test="recordCursor != null">#{recordCursor,jdbcType=BIGINT},</if> |
| | | <if test="pushNum != null">#{pushNum,jdbcType=INTEGER},</if> |
| | | <if test="versions != null">#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endtime != null">#{endtime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord">update yeshi_ec_push_queue set qe_type = #{type,jdbcType=INTEGER},qe_content = #{jsonContent,jdbcType=VARCHAR},qe_start_cursor = #{startCursor,jdbcType=BIGINT},qe_end_cursor = #{endCursor,jdbcType=BIGINT},qe_record_cursor = #{recordCursor,jdbcType=BIGINT},qe_push_num = #{pushNum,jdbcType=INTEGER},qe_versions = #{versions,jdbcType=VARCHAR},qe_state = #{state,jdbcType=INTEGER},qe_createtime = #{createtime,jdbcType=TIMESTAMP},qe_endtime = #{endtime,jdbcType=TIMESTAMP} where qe_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord">update yeshi_ec_push_queue |
| | | <set> |
| | | <if test="type != null">qe_type=#{type,jdbcType=INTEGER},</if> |
| | | <if test="jsonContent != null">qe_content=#{jsonContent,jdbcType=VARCHAR},</if> |
| | | <if test="startCursor != null">qe_start_cursor=#{startCursor,jdbcType=BIGINT},</if> |
| | | <if test="endCursor != null">qe_end_cursor=#{endCursor,jdbcType=BIGINT},</if> |
| | | <if test="recordCursor != null">qe_record_cursor=#{recordCursor,jdbcType=BIGINT},</if> |
| | | <if test="pushNum != null">qe_push_num=#{pushNum,jdbcType=INTEGER},</if> |
| | | <if test="versions != null">qe_versions=#{versions,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">qe_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">qe_createtime=#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endtime != null">qe_endtime=#{endtime,jdbcType=TIMESTAMP},</if> |
| | | </set> where qe_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="fuc_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultMapVO" type="com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO"> |
| | | <result column="f_wxUnionId" property="f_wxUnionId" jdbcType="VARCHAR" /> |
| | | <result column="f_taobaoUid" property="f_taobaoUid" jdbcType="VARCHAR" /> |
| | | <result column="f_phone" property="f_phone" jdbcType="VARCHAR" /> |
| | | <result column="f_alipayAccount" property="f_alipayAccount" jdbcType="VARCHAR" /> |
| | | |
| | | <result column="alipayAccount" property="alipayAccount" jdbcType="VARCHAR" /> |
| | | <result column="alipayAccountName" property="alipayAccountName" jdbcType="VARCHAR" /> |
| | | |
| | | <association property="userInfo" column="id" |
| | | resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">fuc_id,fuc_type,fuc_identify_code,fuc_effective,fuc_create_time,fuc_update_time,fuc_beizhu |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | |
| | | </set> |
| | | where fuc_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="listQuery" resultMap="BaseResultMapVO"> |
| | | SELECT * FROM (SELECT A.uid,A.alipayAccount,A.alipayAccountName,MAX(A.f_wxUnionId) AS f_wxUnionId ,MAX(A.f_taobaoUid) AS f_taobaoUid,MAX(A.f_phone) AS f_phone,MAX(A.f_alipayAccount) AS f_alipayAccount FROM |
| | | (SELECT u.`id`AS uid,b.account AS alipayAccount,b.name AS alipayAccountName,fu.* FROM yeshi_ec_user u |
| | | LEFT JOIN yeshi_ec_binding_account b ON b.`uid` = u.`id` |
| | | LEFT JOIN (SELECT fc.fuc_effective,IF(fc.`fuc_type` = 'wxUnionId',fc.`fuc_identify_code`,NULL)AS f_wxUnionId, |
| | | IF(fc.`fuc_type` = 'taobaoUid',fc.`fuc_identify_code`,NULL)AS f_taobaoUid, |
| | | IF(fc.`fuc_type` = 'phone',fc.`fuc_identify_code`,NULL)AS f_phone, |
| | | IF(fc.`fuc_type` = 'alipayAccount',fc.`fuc_identify_code`,NULL)AS f_alipayAccount |
| | | FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = u.`identifycode` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`) |
| | | WHERE b.`type`= 1 AND fu.fuc_effective = 1 |
| | | |
| | | <if test="key != null and key != '' "> |
| | | AND fu.fuc_identify_code = '%#{key}%' |
| | | </if> |
| | | <if test="type == 1"> |
| | | AND fu.fuc_type = 'wxUnionId' |
| | | </if> |
| | | <if test="type == 2"> |
| | | AND fu.fuc_type = 'taobaoUid' |
| | | </if> |
| | | <if test="type == 3"> |
| | | AND fu.fuc_type = 'phone' |
| | | </if> |
| | | <if test="type == 4"> |
| | | AND fu.fuc_type = 'alipayAccount' |
| | | </if> |
| | | |
| | | )A |
| | | GROUP BY A.uid) B |
| | | LEFT JOIN yeshi_ec_user u ON u.id= B.uid |
| | | LIMIT ${start},${count} |
| | | </select> |
| | | |
| | | <select id="countQuery" resultType="java.lang.Long"> |
| | | |
| | | SELECT IFNULL(COUNT(DISTINCT A.uid),0) FROM |
| | | (SELECT u.`id`AS uid,fu.* FROM yeshi_ec_user u |
| | | LEFT JOIN yeshi_ec_binding_account b ON b.`uid` = u.`id` |
| | | LEFT JOIN (SELECT fc.fuc_effective,IF(fc.`fuc_type` = 'wxUnionId',fc.`fuc_identify_code`,NULL)AS f_wxUnionId, |
| | | IF(fc.`fuc_type` = 'taobaoUid',fc.`fuc_identify_code`,NULL)AS f_taobaoUid, |
| | | IF(fc.`fuc_type` = 'phone',fc.`fuc_identify_code`,NULL)AS f_phone, |
| | | IF(fc.`fuc_type` = 'alipayAccount',fc.`fuc_identify_code`,NULL)AS f_alipayAccount |
| | | FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = u.`identifycode` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`) |
| | | WHERE b.`type`= 1 AND fu.fuc_effective = 1 |
| | | |
| | | <if test="key != null and key != '' "> |
| | | AND fu.fuc_identify_code = '%#{key}%' |
| | | </if> |
| | | <if test="type == 1"> |
| | | AND fu.fuc_type = 'wxUnionId' |
| | | </if> |
| | | <if test="type == 2"> |
| | | AND fu.fuc_type = 'taobaoUid' |
| | | </if> |
| | | <if test="type == 3"> |
| | | AND fu.fuc_type = 'phone' |
| | | </if> |
| | | <if test="type == 4"> |
| | | AND fu.fuc_type = 'alipayAccount' |
| | | </if> |
| | | )A |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | package com.yeshi.fanli.service.impl.config;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Integer> listVersionCodeByVersions(String platform, List<String> listVersion){
|
| | | List<Integer> listVersionCode = null;
|
| | | if (listVersion == null || listVersion.size() == 0) {
|
| | | return listVersionCode;
|
| | | }
|
| | | |
| | | listVersionCode = new ArrayList<Integer>();
|
| | | for (String version: listVersion) {
|
| | | AppVersionInfo appVersion= getByPlatformAndVersion(platform, version);
|
| | | if (appVersion != null && appVersion.getVersionCode() != null) {
|
| | | listVersionCode.add(appVersion.getVersionCode());
|
| | | }
|
| | | }
|
| | | |
| | | return listVersionCode;
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<AppVersionInfo> listByVersions(String platform, List<String> listVersion){
|
| | | List<AppVersionInfo> listVersionCode = null;
|
| | | if (listVersion == null || listVersion.size() == 0) {
|
| | | return listVersionCode;
|
| | | }
|
| | | |
| | | listVersionCode = new ArrayList<AppVersionInfo>();
|
| | | for (String version: listVersion) {
|
| | | AppVersionInfo appVersion= getByPlatformAndVersion(platform, version);
|
| | | if (appVersion != null) {
|
| | | listVersionCode.add(appVersion);
|
| | | }
|
| | | }
|
| | | |
| | | return listVersionCode;
|
| | | }
|
| | | }
|
| | |
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.SwiperPictureMapper;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.service.inter.config.SystemConfigService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | @Service
|
| | | public class SwiperPictureServiceImpl implements SwiperPictureService {
|
| | |
|
| | | @Resource
|
| | | private SwiperPictureMapper swiperPictureMapper;
|
| | | |
| | | @Resource
|
| | | private SystemConfigService systemConfigService;
|
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) throws SwiperPictureException{
|
| | |
| | | return swiperPictureMapper.countQueryByBannerID(bannerId);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public void save(SwiperPicture record) throws SwiperPictureException{
|
| | | |
| | | if (record == null) {
|
| | | throw new SwiperPictureException(1, "参数不能为空");
|
| | | }
|
| | | |
| | | Long bannerId = record.getBannerId();
|
| | | if (bannerId == null) {
|
| | | throw new SwiperPictureException(1, "标识管理ID不能为空");
|
| | | }
|
| | | |
| | | String params = record.getParams();
|
| | | if (!StringUtil.isNullOrEmpty(params)) {
|
| | | try {
|
| | | String jumpValue = systemConfigService.get("jump");
|
| | | if (StringUtil.isNullOrEmpty(jumpValue)) {
|
| | | jumpValue = "{\"url\":\"#\"}";
|
| | | }
|
| | | params = jumpValue.replace("#", params);
|
| | | |
| | | } catch (NotExistObjectException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | Long id = record.getId();
|
| | | |
| | | if (id == null) {
|
| | | // 新增
|
| | | |
| | | int maxOrder = swiperPictureMapper.getMaxOrderByBannerID(bannerId);
|
| | | record.setOrder(maxOrder + 1);
|
| | | // 默认停用
|
| | | record.setState(1);
|
| | | // 默认非系统控制
|
| | | record.setAutoControl(1);
|
| | | // 默认非登陆
|
| | | record.setJumpNeedLogin(false);
|
| | | record.setCreatetime(new Date());
|
| | | record.setUpdatetime(new Date());
|
| | | |
| | | swiperPictureMapper.insert(record);
|
| | | } else {
|
| | | // 修改
|
| | | SwiperPicture resultObj = swiperPictureMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new SwiperPictureException(1, "参数不能为空");
|
| | | }
|
| | | |
| | | record.setOrder(resultObj.getOrder());
|
| | | record.setCreatetime(resultObj.getCreatetime());
|
| | | record.setUpdatetime(new Date());
|
| | | swiperPictureMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws SwiperPictureException{
|
| | |
| | | private DeviceTokenHWService deviceTokenHWService;
|
| | |
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
|
| | | String gid = auctionId + "";
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", "");
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", url);
|
| | | json.put("type", "url");
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX) throws PushException {
|
| | | public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
|
| | |
|
| | | JSONObject contentJson = new JSONObject();
|
| | | contentJson.put("isOpen", 0);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
|
| | | // TODO 推送weex页面
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
|
| | | // TODO 推送淘客百川链接
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
|
| | | // TODO Auto-generated method stub
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.controller.admin.PushController;
|
| | | import com.yeshi.fanli.dao.mybatis.push.DeviceTokenIOSMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.push.PushQueueRecordMapper;
|
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.AccountMessage;
|
| | | import com.yeshi.fanli.entity.push.DeviceTokenIOS;
|
| | | import com.yeshi.fanli.entity.push.PushQueueRecord;
|
| | |
| | | import com.yeshi.fanli.entity.xinge.PushRecord;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | | import com.yeshi.fanli.log.PushLogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.push.IOSPushService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | | import com.yeshi.fanli.util.CMQManager;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | | |
| | | @Resource
|
| | | private AppVersionService appVersionService;
|
| | | |
| | |
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
|
| | |
|
| | | String url = "https://item.taobao.com/item.htm?id=" + auctionId;
|
| | | JSONObject json = new JSONObject();
|
| | |
| | |
|
| | | if (uid == null || uid == 0) {
|
| | |
|
| | | addPushIOSQueue(info, url, PushController.GOODS);
|
| | | addPushIOSQueue(info, url, PushController.GOODS, listVersion);
|
| | |
|
| | | /*
|
| | | * // 查询IOS所有设备号 // TODO 需要全推 List<String> deviceTokenList =
|
| | |
| | | }
|
| | |
|
| | | // IOS 单推
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", url);
|
| | | json.put("type", "url");
|
| | |
| | | if (uid == null || uid == 0) {
|
| | | // TODO 需要全推
|
| | |
|
| | | addPushIOSQueue(info, url, PushController.URL);
|
| | | addPushIOSQueue(info, url, PushController.URL, listVersion);
|
| | |
|
| | | /*
|
| | | * List<String> deviceTokenList = getDeviceTokenList(1, 1000);
|
| | |
| | | return; // 通知免打扰(20:00-24:00 / 00:00 -08:00)
|
| | | }
|
| | |
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException {
|
| | | public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
|
| | |
|
| | |
| | |
|
| | | // TODO 需要全推
|
| | |
|
| | | addPushIOSQueue(info, id + "", PushController.ZNX);
|
| | | addPushIOSQueue(info, id + "", PushController.ZNX, listVersion);
|
| | |
|
| | | /*
|
| | | * List<String> deviceTokenList = getDeviceTokenList(1, 1000);
|
| | |
| | | json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(msg.getUserInfo().getId());
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(msg.getUserInfo().getId(), listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid) {
|
| | | return deviceTokenIOSMapper.selectByUid(uid);
|
| | | public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid, List<String> listVersion) {
|
| | | // 版本号
|
| | | List<Integer> listCode = appVersionService.listVersionCodeByVersions(AppVersionInfo.PLATFORM_IOS,listVersion);
|
| | |
|
| | | return deviceTokenIOSMapper.selectByUid(uid, listCode);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<String> getDeviceTokenList(int page, int size) {
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList((long) ((page - 1) * size), size);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList((long) ((page - 1) * size), size, null);
|
| | | List<String> tokenList = new ArrayList<>();
|
| | | for (DeviceTokenIOS ios : list)
|
| | | if (!StringUtil.isNullOrEmpty(ios.getDeviceToken()))
|
| | |
| | | * @param json
|
| | | */
|
| | | @Transactional
|
| | | public void addPushIOSQueue(MessageInfo info, String url, int type) {
|
| | | public void addPushIOSQueue(MessageInfo info, String url, int type, List<String> listVersion) {
|
| | |
|
| | | try {
|
| | |
|
| | |
| | | // 每次执行条目
|
| | | int pushNum = 50;
|
| | |
|
| | | String versionCodes = "";
|
| | | List<Integer> listCode = appVersionService.listVersionCodeByVersions(AppVersionInfo.PLATFORM_IOS,listVersion);
|
| | | |
| | | if (listCode != null && listCode.size() > 0) {
|
| | | for (Integer code: listCode) {
|
| | | versionCodes = versionCodes + code + ",";
|
| | | }
|
| | | |
| | | // 去除末尾逗号
|
| | | if (versionCodes.endsWith(",")) {
|
| | | versionCodes = versionCodes.substring(0, versionCodes.length() - 1);
|
| | | }
|
| | | }
|
| | | |
| | | for (long i = 0; i < tokenCount + totalCount;) {
|
| | |
|
| | | PushQueueRecord pushQueueRecord = new PushQueueRecord();
|
| | |
| | | pushQueueRecord.setPushNum(pushNum);
|
| | | // 推送端 IOS
|
| | | pushQueueRecord.setType(1);
|
| | | // 版本号
|
| | | pushQueueRecord.setVersions(versionCodes);
|
| | | |
| | |
|
| | | if (tokenCount - i < totalCount) {
|
| | | // 起始游标
|
| | |
| | | Long startCursor = pushQueueRecord.getStartCursor();
|
| | | // 结束位置
|
| | | Long endCursor = pushQueueRecord.getEndCursor();
|
| | |
|
| | | // 版本号
|
| | | String[] versionArray = null;
|
| | | String versions = pushQueueRecord.getVersions();
|
| | | if (versions != null && versions.trim().length() == 0) {
|
| | | versionArray = versions.split(",");
|
| | | }
|
| | | |
| | | if (startCursor == null && endCursor == null) {
|
| | | return;
|
| | | }
|
| | |
| | | long recordCursor = startCursor;
|
| | |
|
| | | for (int i = 0; i < count; i++) {
|
| | |
|
| | | |
| | | |
| | | // 不足50个数据
|
| | | if (moveNum > total) {
|
| | | moveNum = (int) (endCursor - startCursor);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(startCursor, moveNum);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(startCursor, moveNum, versionArray);
|
| | | recordCursor = endCursor;
|
| | |
|
| | | if (list != null) {
|
| | |
| | | // System.out.println("recordCursorend:" +recordCursor);
|
| | | moveNum = (int) (endCursor - recordCursor);
|
| | | // System.out.println(moveNum);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum, versionArray);
|
| | | if (list != null) {
|
| | | executePushIOS(list, pushQueueRecord, endCursor);
|
| | | PushLogHelper.iosInfo("推送游标:" + recordCursor + "," + moveNum);
|
| | |
| | | recordCursor = endCursor;
|
| | |
|
| | | } else {
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum);
|
| | | List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum, versionArray);
|
| | | recordCursor = recordCursor + 50;
|
| | |
|
| | | if (list != null) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | | info.setContent(content);
|
| | | info.setDescription(content);
|
| | | // IOS 全推
|
| | | if (uid == null || uid == 0) {
|
| | | addPushIOSQueue(info, weexUrl, PushController.WEEX);
|
| | | addPushIOSQueue(info, weexUrl, PushController.WEEX, listVersion);
|
| | | } else {
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | | info.setContent(content);
|
| | | info.setDescription(content);
|
| | | // IOS 全推
|
| | | if (uid == null || uid == 0) {
|
| | | addPushIOSQueue(info, url, PushController.BAICHUAN);
|
| | | addPushIOSQueue(info, url, PushController.BAICHUAN, listVersion);
|
| | | } else {
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | | info.setContent(content);
|
| | | info.setDescription(content);
|
| | | // IOS 全推
|
| | | if (uid == null || uid == 0) {
|
| | | addPushIOSQueue(info, "", PushController.WELFARE_CENTER);
|
| | | addPushIOSQueue(info, "", PushController.WELFARE_CENTER, listVersion);
|
| | | } else {
|
| | | if (!validateNotDisturbSingle(uid)) {
|
| | | return;
|
| | | }
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
|
| | | List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
|
| | | List<String> deviceTokenList = new ArrayList<>();
|
| | | if (deviceTokenIosList != null)
|
| | | for (DeviceTokenIOS ios : deviceTokenIosList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public int insertSelective(PushCouponRecord record) {
|
| | | public int insertSelective(PushCouponRecord record) throws Exception{
|
| | | return pushCouponRecordMapper.insertSelective(record);
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.service.impl.push;
|
| | |
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | if (pushCoupon == null) {
|
| | | throw new PushCouponException(1, "推送信息已不存在");
|
| | | }
|
| | | |
| | | if(pushCoupon.isPushed()) {
|
| | | throw new PushCouponException(1, "该信息不能重复推送");
|
| | | }
|
| | | |
| | |
|
| | | String title = pushCoupon.getTitle();
|
| | | String content = pushCoupon.getContent();
|
| | |
| | | throw new PushCouponException(1, "标题或内容不能为空");
|
| | | }
|
| | |
|
| | | |
| | | List<String> listVersion = null;
|
| | | String versions = pushCoupon.getVersions();
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | String uids = pushCoupon.getUids();
|
| | | if (uids == null || uids.trim().length() == 0) {
|
| | | // 全推
|
| | | pushService.pushWelfareCenter(null, title, content);
|
| | | pushService.pushWelfareCenter(null, title, content, listVersion);
|
| | |
|
| | | } else {
|
| | | // 指定用户推送
|
| | |
| | | for (int i = 0; i < uidArray.length; i++) {
|
| | | String str_uid = uidArray[i];
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content);
|
| | | pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listVersion);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.push;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | if (goodsList == null || goodsList.size() == 0) {
|
| | | throw new PushException(1, "推送无商品,请完善数据");
|
| | | }
|
| | |
|
| | | |
| | | List<String> listVersion = null;
|
| | | String versions = pushGoods.getVersions();
|
| | | if (versions != null && versions.trim().length() > 0) {
|
| | | listVersion = Arrays.asList(versions.split(","));
|
| | | }
|
| | | |
| | | if (goodsList.size() == 1) {
|
| | | /* 单个商品推送: 直接处理为商品信息 */
|
| | | PushGoodsGroup pushGoodsGroup = goodsList.get(0);
|
| | |
| | |
|
| | | Long goodsId = commonGoods.getGoodsId();
|
| | | String url = "https://item.taobao.com/item.htm?id=" + goodsId;
|
| | | |
| | | pushService.pushGoods(pushGoods.getUid(), url, alertTitle, alertContent, listVersion);
|
| | |
|
| | | pushService.pushGoods(pushGoods.getUid(), url, alertTitle, alertContent);
|
| | |
|
| | | } else {
|
| | | /* 多个商品推送 */
|
| | | String url = configService.get("push_goods_details");
|
| | |
| | | // 生成链接
|
| | | url = url + "?id=" + id;
|
| | |
|
| | | pushService.pushUrl(pushGoods.getUid(), url, alertTitle, alertContent);
|
| | | pushService.pushUrl(pushGoods.getUid(), url, alertTitle, alertContent, listVersion);
|
| | | }
|
| | |
|
| | | // 已推送
|
| | |
| | | package com.yeshi.fanli.service.impl.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | |
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushGoods(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushGoods(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
|
| | | String gids = url.split("id=")[1];
|
| | | String gid = gids.split("&")[0];
|
| | | if (StringUtil.isNullOrEmpty(gid))
|
| | |
| | | if (StringUtil.isNullOrEmpty(title))
|
| | | throw new PushException(1, "请填写推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | | throw new PushException(1, "请填写推送内容");
|
| | | throw new PushException(1, "请填写推送内容"); |
| | |
|
| | | PushRecord pushRecord = new PushRecord();
|
| | | pushRecord.setState(1);
|
| | |
| | | pushRecord.setAccount(1);
|
| | | pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
|
| | |
|
| | | xmPushService.pushGoods(uid, Long.parseLong(gid), title, content);
|
| | | iosPushService.pushGoods(uid, Long.parseLong(gid), title, content);
|
| | | xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion);
|
| | | iosPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion);
|
| | | // hwPushService.pushGoods(uid, Long.parseLong(gid), title, content);
|
| | |
|
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | |
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(1, "无推送链接");
|
| | |
| | | pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName());
|
| | | pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
|
| | |
|
| | | xmPushService.pushUrl(uid, url, title, content);
|
| | | iosPushService.pushUrl(uid, url, title, content);
|
| | | hwPushService.pushUrl(uid, url, title, content);
|
| | | xmPushService.pushUrl(uid, url, title, content, listVersion);
|
| | | iosPushService.pushUrl(uid, url, title, content, listVersion);
|
| | | hwPushService.pushUrl(uid, url, title, content, listVersion);
|
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushZNX(Long uId, String title, String content) throws PushException {
|
| | | public void pushZNX(Long uId, String title, String content, List<String> listVersion) throws PushException {
|
| | | if (StringUtil.isNullOrEmpty(title))
|
| | | throw new PushException(1, "无推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | |
| | | pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName());
|
| | | pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
|
| | |
|
| | | xmPushService.pushZNX(uId, null, systemZnx);
|
| | | iosPushService.pushZNX(uId, null, systemZnx);
|
| | | hwPushService.pushZNX(uId, null, systemZnx);
|
| | | xmPushService.pushZNX(uId, null, systemZnx, listVersion);
|
| | | iosPushService.pushZNX(uId, null, systemZnx, listVersion);
|
| | | hwPushService.pushZNX(uId, null, systemZnx, listVersion);
|
| | | // 插入推送记录
|
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | } else {
|
| | |
| | | accountMessage.setContent(content);
|
| | | accountMessageMapper.insertSelective(accountMessage);
|
| | |
|
| | | xmPushService.pushZNX(uId, accountMessage, null);
|
| | | iosPushService.pushZNX(uId, accountMessage, null);
|
| | | hwPushService.pushZNX(uId, accountMessage, null);
|
| | | xmPushService.pushZNX(uId, accountMessage, null, listVersion);
|
| | | iosPushService.pushZNX(uId, accountMessage, null, listVersion);
|
| | | hwPushService.pushZNX(uId, accountMessage, null, listVersion);
|
| | |
|
| | | // 插入推送记录
|
| | | PushRecord pushRecord = new PushRecord();
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
|
| | | if (StringUtil.isNullOrEmpty(title))
|
| | | throw new PushException(1, "无推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | | throw new PushException(1, "无推送内容");
|
| | | iosPushService.pushWEEX(uid, title, content, weexUrl);
|
| | | iosPushService.pushWEEX(uid, title, content, weexUrl, listVersion);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
|
| | | iosPushService.pushBaiChuanUrl(uid, title, content, url);
|
| | | xmPushService.pushBaiChuanUrl(uid, title, content, url);
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
|
| | | iosPushService.pushBaiChuanUrl(uid, title, content, url, listVersion);
|
| | | xmPushService.pushBaiChuanUrl(uid, title, content, url, listVersion);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
|
| | | iosPushService.pushWelfareCenter(uid, title, content);
|
| | | xmPushService.pushWelfareCenter(uid, title, content);
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
|
| | | iosPushService.pushWelfareCenter(uid, title, content, listVersion);
|
| | | xmPushService.pushWelfareCenter(uid, title, content, listVersion);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.xinge.PushRecord;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | | import com.yeshi.fanli.log.PushLogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.push.XMPushService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.push.PushUtils;
|
| | |
| | |
|
| | | @Resource
|
| | | private AppVersionInfoMapper appVersionInfoMapper;
|
| | | |
| | | @Resource
|
| | | private AppVersionService appVersionService;
|
| | |
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
|
| | | |
| | | // 无最低版本限制
|
| | | int minVersionCode = 0;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | |
|
| | | String gid = auctionId + "";
|
| | | JSONObject json = new JSONObject();
|
| | | // json.put("url", "http://item.taobao.com/item.htm?id=" + gid);// IOS使用
|
| | |
| | | json.put("type", "goodsdetail");
|
| | | json.put("miPushUrl", String.format("%s.ui.recommend.GoodsBrowserActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | | |
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | | info.setContent(content);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content) throws PushException {
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
|
| | | // 无最低版本限制
|
| | | int minVersionCode = 0;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", url);
|
| | | json.put("type", "url");
|
| | | json.put("webUrl", url);
|
| | | json.put("miPushUrl", String.format("%s.ui.invite.ShareBrowserActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | | |
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | |
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException {
|
| | | public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
|
| | | |
| | | // 无最低版本限制
|
| | | int minVersionCode = 0;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | | |
| | | MessageInfo info = new MessageInfo();
|
| | |
|
| | | info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
|
| | |
|
| | | JSONObject contentJson = new JSONObject();
|
| | |
|
| | | contentJson.put("isOpen", 0);
|
| | | contentJson.put("createTime", java.lang.System.currentTimeMillis());
|
| | |
|
| | |
| | | json.put("content", contentJson);
|
| | | json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | | |
| | | PushRecord pushRecord = new PushRecord();
|
| | |
|
| | | // 小米 全推
|
| | |
| | | json.put("content", contentJson);
|
| | | json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | | |
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | | |
| | | // 小米 单推
|
| | | try {
|
| | | PushUtils.singlePushXiaoMi(info, json, pushRecord);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
|
| | | // TODO 推送weex页面
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
|
| | |
|
| | | // 设置可推送版本,1.4.8以后的版本可推送
|
| | | int minVersionCode = 31;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0) {
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", weexUrl);
|
| | | json.put("type", "weex");
|
| | | // 设置可推送版本,1.4.8以后的版本可推送
|
| | | json.put("app_version", getVersionByMinVersionCode(31));
|
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | | |
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | | info.setContent(content);
|
| | |
| | |
|
| | | return versions;
|
| | | }
|
| | | |
| | | /**
|
| | | * 查询能推送版本号
|
| | | * @param versionCode
|
| | | * @param listVersion
|
| | | * @return
|
| | | */
|
| | | private String getCanPushVersions(int versionCode, List<String> listVersion) {
|
| | | List<AppVersionInfo> list = appVersionService.listByVersions(AppVersionInfo.PLATFORM_ANDROID, listVersion);
|
| | | String versions = "";
|
| | | |
| | | if (list != null) {
|
| | | for (AppVersionInfo appVersion : list) {
|
| | | Integer code = appVersion.getVersionCode();
|
| | | if (code != null && code >= versionCode) {
|
| | | versions += appVersion.getVersion() + ",";
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | if (versions.endsWith(",")) {
|
| | | versions = versions.substring(0, versions.length() - 1);
|
| | | }
|
| | | |
| | | return versions;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
|
| | | |
| | | // 设置可推送版本,1.4.8以后的版本可推送
|
| | | int minVersionCode = 31;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0){
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("url", url);
|
| | | json.put("type", "baichuan");
|
| | | // 设置可推送版本,1.4.8以后的版本可推送
|
| | | json.put("app_version", getVersionByMinVersionCode(31));
|
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | |
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
|
| | | |
| | | // 1.5.1之后的版本可推送
|
| | | int minVersionCode = 36;
|
| | | String appVersion = null;
|
| | | if (listVersion != null && listVersion.size() > 0) {
|
| | | appVersion = getCanPushVersions(minVersionCode, listVersion);
|
| | | } else if (minVersionCode > 0){
|
| | | appVersion = getVersionByMinVersionCode(minVersionCode);
|
| | | }
|
| | | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("type", "welfare");
|
| | | json.put("miPushUrl", String.format("%s.ui.mine.WelfareCenterActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | // 1.5.1之后的版本可推送
|
| | | json.put("app_version", getVersionByMinVersionCode(36));
|
| | | // 版本推送
|
| | | if (appVersion != null && appVersion.trim().length() > 0) {
|
| | | json.put("app_version", appVersion);
|
| | | }
|
| | |
|
| | | MessageInfo info = new MessageInfo();
|
| | | info.setTitle(title);
|
| | |
| | | /UserShareGoodsGroupServiceImpl.java |
| | | /UserSystemCouponServiceImpl.java |
| | |
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
|
| | |
|
| | | @Service
|
| | | public class ForbiddenUserIdentifyCodeServiceImpl implements ForbiddenUserIdentifyCodeService {
|
| | |
| | | forbiddenUserIdentifyCodeMapper.deleteByPrimaryKey(identifyCode.getId());
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<ForbiddenUserIdentifyCodeVO> listQuery(long start, int count, String key, Integer type) {
|
| | | |
| | | List<ForbiddenUserIdentifyCodeVO> list = forbiddenUserIdentifyCodeMapper.listQuery(start, count, key, type);
|
| | | if (list == null || list.size() == 0) {
|
| | | return list;
|
| | | }
|
| | | |
| | | for (ForbiddenUserIdentifyCodeVO forbiddenUserIdentifyCodeVO: list) {
|
| | | |
| | | String f_alipayAccount = forbiddenUserIdentifyCodeVO.getF_alipayAccount();
|
| | | if (f_alipayAccount != null && f_alipayAccount.trim().length() > 0) {
|
| | | forbiddenUserIdentifyCodeVO.setAlipayAccountState(1);
|
| | | }
|
| | | |
| | | String f_phone = forbiddenUserIdentifyCodeVO.getF_phone();
|
| | | if (f_phone != null && f_phone.trim().length() > 0) {
|
| | | forbiddenUserIdentifyCodeVO.setPhoneState(1);
|
| | | }
|
| | | |
| | | String f_taobaoUid = forbiddenUserIdentifyCodeVO.getF_taobaoUid();
|
| | | if (f_taobaoUid != null && f_taobaoUid.trim().length() > 0) {
|
| | | forbiddenUserIdentifyCodeVO.setTaobaoUidState(1);
|
| | | }
|
| | | |
| | | String f_wxUnionId = forbiddenUserIdentifyCodeVO.getF_wxUnionId();
|
| | | if (f_wxUnionId != null && f_wxUnionId.trim().length() > 0) {
|
| | | forbiddenUserIdentifyCodeVO.setWxUnionIdState(1);
|
| | | }
|
| | | }
|
| | | |
| | | return list;
|
| | | |
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key, Integer type) {
|
| | | return forbiddenUserIdentifyCodeMapper.countQuery(key, type);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void saveForbiddenInfo(String identifyCode, Integer type, boolean state) throws ForbiddenUserIdentifyCodeException{
|
| | | |
| | | ForbiddenUserIdentifyCodeTypeEnum typeEnum = null;
|
| | | |
| | | switch(type) {
|
| | | case 1: // 微信账号
|
| | | typeEnum = ForbiddenUserIdentifyCodeTypeEnum.wxUnionId;
|
| | | break;
|
| | | case 2: // 淘宝账号
|
| | | typeEnum = ForbiddenUserIdentifyCodeTypeEnum.taobaoUid;
|
| | | break;
|
| | | case 3: // 电话号码
|
| | | typeEnum = ForbiddenUserIdentifyCodeTypeEnum.phone;
|
| | | break;
|
| | | case 4: // 支付宝账号
|
| | | typeEnum = ForbiddenUserIdentifyCodeTypeEnum.alipayAccount;
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | |
| | | if (typeEnum == null) {
|
| | | throw new ForbiddenUserIdentifyCodeException(1, "类型不匹配");
|
| | | }
|
| | | |
| | | ForbiddenUserIdentifyCode codeObject = listByTypeAndIdentifyCode(typeEnum ,identifyCode);
|
| | | if (codeObject == null) {
|
| | | // 封禁账户
|
| | | if (state) {
|
| | | codeObject = new ForbiddenUserIdentifyCode();
|
| | | codeObject.setType(typeEnum);
|
| | | codeObject.setIdentifyCode(identifyCode);
|
| | | codeObject.setEffective(state);
|
| | | codeObject.setCreateTime(new Date());
|
| | | codeObject.setUpdateTime(new Date());
|
| | | |
| | | forbiddenUserIdentifyCodeMapper.insertSelective(codeObject);
|
| | | } else {
|
| | | throw new ForbiddenUserIdentifyCodeException(1, "未找到可解封号码");
|
| | | }
|
| | | } else {
|
| | | codeObject.setEffective(state);
|
| | | codeObject.setUpdateTime(new Date());
|
| | | forbiddenUserIdentifyCodeMapper.updateByPrimaryKeySelective(codeObject);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getNewerHongbaoTitle(),
|
| | | Constant.znxConfig.getNewerHongbaoMsg().replace("[金额]", money.toString()));
|
| | | Constant.znxConfig.getNewerHongbaoMsg().replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getOrderFanliRecieveTitle(), Constant.znxConfig
|
| | | .getOrderFanliRecieveMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
|
| | | .getOrderFanliRecieveMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(),
|
| | | Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()));
|
| | | Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getFanliOrderStatisticedTitle(),
|
| | | Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId));
|
| | | Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | orderId = orderId.substring(0, orderId.length() - 6) + "******";
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getTichengOrderStatisticedTitle(), Constant.znxConfig
|
| | | .getTichengOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
|
| | | .getTichengOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractApplayTitle(),
|
| | | Constant.znxConfig.getExtractApplayMsg());
|
| | | Constant.znxConfig.getExtractApplayMsg(), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractTransferFailTitle(),
|
| | | Constant.znxConfig.getExtractTransferFailMsg().replace("[时间]", time));
|
| | | Constant.znxConfig.getExtractTransferFailMsg().replace("[时间]", time), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractWrongTitle(),
|
| | | Constant.znxConfig.getExtractWrongMsg().replace("[时间]", time));
|
| | | Constant.znxConfig.getExtractWrongMsg().replace("[时间]", time), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractSuccessTitle(),
|
| | | Constant.znxConfig.getExtractSuccessMsg().replace("[时间]", time));
|
| | | Constant.znxConfig.getExtractSuccessMsg().replace("[时间]", time), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getInviteMoneyRecieveTitle(),
|
| | | Constant.znxConfig.getInviteMoneyRecieveMsg().replace("[金额]", money.toString()));
|
| | | Constant.znxConfig.getInviteMoneyRecieveMsg().replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(),
|
| | | Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()));
|
| | | Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | orderId = orderId.substring(0, orderId.length() - 6) + "******";
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getShareOrderStatisticedTitle(), Constant.znxConfig
|
| | | .getShareOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
|
| | | .getShareOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | orderId = orderId.substring(0, orderId.length() - 6) + "******";
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getInviteOrderStatisticedTitle(), Constant.znxConfig
|
| | | .getInviteOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
|
| | | .getInviteOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | */
|
| | | public List<AppVersionInfo> listByPlatformAndMinVersion(String platform,String version);
|
| | |
|
| | | /**
|
| | | * 根据平台、版本号批量查询
|
| | | * @param listVersion
|
| | | * @return
|
| | | */
|
| | | public List<Integer> listVersionCodeByVersions(String platform, List<String> listVersion);
|
| | |
|
| | | /**
|
| | | * 根据平台、版本号批量查询
|
| | | * @param platform
|
| | | * @param listVersion
|
| | | * @return
|
| | | */
|
| | | public List<AppVersionInfo> listByVersions(String platform, List<String> listVersion);
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public List<SwiperPicture> getByBannerCard(String card) throws SwiperPictureException;
|
| | |
|
| | | /**
|
| | | * 保存信息
|
| | | * @param record
|
| | | * @throws SwiperPictureException
|
| | | */
|
| | | public void save(SwiperPicture record) throws SwiperPictureException;
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.AccountMessage;
|
| | | import com.yeshi.fanli.entity.system.SystemZnx;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException;
|
| | | void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送链接
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUrl(Long uid, String url, String title, String content) throws PushException;
|
| | | void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送站内信
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException;
|
| | | void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送weex页面
|
| | |
| | | * @param weexUrl
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException;
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送百川网页
|
| | |
| | | * @param url
|
| | | * @throws PushException
|
| | | */
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException;
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送福利中心(版本号:1.5.1后)
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWelfareCenter(Long uid, String title, String content) throws PushException;
|
| | | void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException;
|
| | | }
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.push.DeviceTokenIOS;
|
| | | import com.yeshi.fanli.entity.push.PushQueueRecord;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | |
|
| | | /**
|
| | | * IOS推送服务
|
| | |
| | | * @param deviceToken
|
| | | * @param device
|
| | | */
|
| | | public void addDeviceToken(Long uid, int version, String deviceToken, String device);
|
| | | public void addDeviceToken(Long uid, int version, String deviceToken, String device);
|
| | |
|
| | | /**
|
| | | * 更新设备的deviceToken
|
| | |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid);
|
| | | public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid, List<String> listVersion);
|
| | |
|
| | | /**
|
| | | * 获取DeviceToken不为空的列表
|
| | |
| | |
|
| | | public int insert(PushCouponRecord record);
|
| | |
|
| | | public int insertSelective(PushCouponRecord record);
|
| | | public int insertSelective(PushCouponRecord record) throws Exception;
|
| | |
|
| | | public PushCouponRecord selectByPrimaryKey(Long id);
|
| | |
|
| | |
| | | package com.yeshi.fanli.service.inter.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | |
|
| | | public interface PushService {
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushGoods(Long uid, String url, String title, String content) throws PushException;
|
| | | void pushGoods(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送链接
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUrl(Long uid, String url, String title, String content) throws PushException;
|
| | | void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送站内信
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushZNX(Long uId, String title, String content) throws PushException;
|
| | | void pushZNX(Long uId, String title, String content, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送weex页面
|
| | |
| | | * @param weexUrl
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException;
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送百川网页
|
| | |
| | | * @param url
|
| | | * @throws PushException
|
| | | */
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException;
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送福利中心
|
| | |
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWelfareCenter(Long uid, String title, String content) throws PushException;
|
| | | void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException;
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
|
| | |
|
| | | public interface ForbiddenUserIdentifyCodeService {
|
| | |
|
| | |
| | | */
|
| | | public void delete(ForbiddenUserIdentifyCode identifyCode);
|
| | |
|
| | | /**
|
| | | * 查询已封禁的号码 用户信息
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public List<ForbiddenUserIdentifyCodeVO> listQuery(long start, int count, String key, Integer type);
|
| | |
|
| | | public long countQuery(String key, Integer type);
|
| | |
|
| | | /**
|
| | | * 对账号封禁、解封操作
|
| | | * @param identifyCode 号码
|
| | | * @param type 类型 |
| | | * @param state 状态: true 封
|
| | | * @throws ForbiddenUserIdentifyCodeException
|
| | | */
|
| | | public void saveForbiddenInfo(String identifyCode, Integer type, boolean state) throws ForbiddenUserIdentifyCodeException;
|
| | |
|
| | | }
|
| | |
| | | public class Constant {
|
| | | public static boolean IS_TASK = false;
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = true;
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = false;
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
|
| | |
| | | #druid.password=hexiaohui
|
| | |
|
| | |
|
| | | #druid.url=jdbc:mysql://192.168.1.253:3306/ec_quan
|
| | | #druid.username=root
|
| | | #druid.password=123456
|
| | |
|
| | |
|
| | | druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test
|
| | | druid.url=jdbc:mysql://192.168.1.253:3306/ec_quan
|
| | | druid.username=root
|
| | | druid.password=Yeshi2016@
|
| | | druid.password=123456
|
| | |
|
| | |
|
| | | #druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test
|
| | | #druid.username=root
|
| | | #druid.password=Yeshi2016@
|
| | |
|
| | |
|
| | | #druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test_online
|
| | |
| | | import org.junit.Test;
|
| | | import org.yeshi.utils.mybatis.MyBatisMapperUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionAuthRecord;
|
| | | import com.yeshi.fanli.entity.push.PushCoupon;
|
| | |
|
| | | public class MyBatisProduce {
|
| | |
|
| | | @Test
|
| | | public void test3() {
|
| | | MyBatisMapperUtil.createMapper(UserExtraTaoBaoInfo.class);
|
| | | MyBatisMapperUtil.createMapper(TaoBaoUnionAuthRecord.class);
|
| | | MyBatisMapperUtil.createMapper(PushCoupon.class);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | System.out.println("maxRange: "+maxRange);
|
| | | System.out.println("minRange: "+minRange);
|
| | |
|
| | | if (probability != 0) {
|
| | | if (result > minRange && result <= maxRange) {
|
| | | returnobj = obj2;
|
| | | break;
|
| | | }
|
| | | if (result > minRange && result <= maxRange) {
|
| | | returnobj = obj2;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | |
|
| | | public static void main(String[] args) {
|
| | | System.out.println(JSON.toJSONString(generateAward()));
|
| | | for (int i =0 ; i<10 ;i ++) {
|
| | | System.out.println(1+ Math.round(Math.random() * (3)));
|
| | | }
|
| | | }
|
| | |
|
| | | } |