| | |
| | |
|
| | | ActivityUser user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | | try {
|
| | | for(SystemEnum system:SystemEnum.values())
|
| | | goodsEvaluateService.addGoodsEvaluate(itemId + "", imageList, user, doc, null,
|
| | | new Date(startTime - 1000 * 60 * 20L * i), SystemEnum.blks);
|
| | | new Date(startTime - 1000 * 60 * 20L * i),system);
|
| | | } catch (GoodsEvaluateException e) {
|
| | | e.printStackTrace();
|
| | | } catch (Exception e) {
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "saveAdd")
|
| | | public void saveAdd(String callback, AppPageNotification appPageNotification, PrintWriter out) {
|
| | | public void saveAdd(AdminAcceptData acceptData, String callback, AppPageNotification appPageNotification, PrintWriter out) {
|
| | | try {
|
| | | String content = appPageNotification.getContent();
|
| | | if (StringUtil.isNullOrEmpty(content) ) {
|
| | |
| | |
|
| | | AppPageNotificationTypeEnum type = appPageNotification.getType();
|
| | | if (type != null) {
|
| | | AppPageNotification old = appPageNotificationService.getAppPageNotificationByType(type.name());
|
| | | AppPageNotification old = appPageNotificationService.getAppPageNotificationByType(type.name(),acceptData.getSystem());
|
| | | if (old != null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("已存在此类型"));
|
| | | return;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | Integer show, Integer canClose,String version, String platform, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | |
| | |
|
| | | try {
|
| | | List<AppPageNotification> list = appPageNotificationService.listQuery((pageIndex - 1) * pageSize,
|
| | | pageSize, key, show, canClose);
|
| | | pageSize, key, show, canClose,acceptData.getSystem());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | long count = appPageNotificationService.countQuery(key, show, canClose);
|
| | | long count = appPageNotificationService.countQuery(key, show, canClose,acceptData.getSystem());
|
| | |
|
| | | List<AppVersionInfo> versionList = null;
|
| | | if (!StringUtil.isNullOrEmpty(version) || !StringUtil.isNullOrEmpty(platform)) {
|
| | |
| | | if (appVersion != null)
|
| | | versionList.add(appVersion);
|
| | | } else {
|
| | | List<AppVersionInfo> appVersionList = appVersionService.getAppVersionInfoListByPlatform(platform);
|
| | | List<AppVersionInfo> appVersionList = appVersionService.getAppVersionInfoListByPlatform(platform,acceptData.getSystem());
|
| | | if (appVersionList != null) {
|
| | | versionList.addAll(appVersionList);
|
| | | }
|
| | |
| | |
|
| | | /**
|
| | | * 设置版本
|
| | | * |
| | | * @param callback
|
| | | * @param id
|
| | | * @param moveType
|
| | | * @param sex
|
| | | * @param versions
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "setVersions")
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | |
| | | * 保存信息
|
| | | *
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BrandClass brandClass, PrintWriter out) {
|
| | | public void save(AdminAcceptData acceptData, String callback, BrandClass brandClass, PrintWriter out) {
|
| | | try {
|
| | | brandClassService.saveObject(brandClass);
|
| | | List<SystemEnum> systemList=new ArrayList<>();
|
| | | systemList.add(acceptData.getSystem());
|
| | | brandClassService.saveObject(brandClass,systemList);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BrandClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | | * 修改排序
|
| | | *
|
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrder")
|
| | | public void updateOrder(String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | public void updateOrder(AdminAcceptData acceptData,String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | try {
|
| | | brandClassService.updateOrder(id, moveType);
|
| | | brandClassService.updateOrder(id, moveType,acceptData.getSystem());
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (BrandClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
|
| | | PrintWriter out) {
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | List<BrandClass> list = brandClassService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state);
|
| | | List<BrandClass> list = brandClassService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state,acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = brandClassService.countQuery(key, state);
|
| | | long count = brandClassService.countQuery(key, state,acceptData.getSystem());
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getOptions")
|
| | | public void getOptions(String callback, PrintWriter out) {
|
| | | public void getOptions(AdminAcceptData acceptData, String callback, PrintWriter out) {
|
| | | try {
|
| | | List<BrandClass> list = brandClassService.listEffective();
|
| | | List<BrandClass> list = brandClassService.listEffective(acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | * 添加店铺入库
|
| | | *
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveShopInfo")
|
| | |
| | | * 保存信息
|
| | | *
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveClassShop")
|
| | |
| | | * 修改排序
|
| | | *
|
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrderClassShop")
|
| | |
| | | * 修改排序
|
| | | *
|
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrderBrand")
|
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "query") |
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, String typeEnum, PrintWriter out) { |
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, String typeEnum, PrintWriter out) { |
| | | if (pageIndex == null || pageIndex < 1) { |
| | | pageIndex = 1; |
| | | } |
| | |
| | | } |
| | | |
| | | try { |
| | | List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1, typeEnum); |
| | | List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1, typeEnum,acceptData.getSystem()); |
| | | if (list == null || list.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据")); |
| | | return; |
| | |
| | | } |
| | | } |
| | | |
| | | long count = goodsEvaluateService.count(key, state, 1, typeEnum); |
| | | long count = goodsEvaluateService.count(key, state, 1, typeEnum,acceptData.getSystem()); |
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "querySuCai") |
| | | public void querySuCai(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, |
| | | public void querySuCai(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, |
| | | PrintWriter out) { |
| | | if (pageIndex == null || pageIndex < 1) { |
| | | pageIndex = 1; |
| | |
| | | } |
| | | |
| | | try { |
| | | List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2, null); |
| | | List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2, null,acceptData.getSystem()); |
| | | if (list == null || list.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据")); |
| | | return; |
| | |
| | | } |
| | | } |
| | | |
| | | long count = goodsEvaluateService.count(key, state, 2, null); |
| | | long count = goodsEvaluateService.count(key, state, 2, null,acceptData.getSystem()); |
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); |
| | |
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | List<HelpCenter> list = helpCenterService.query(0, Integer.MAX_VALUE, key, cid, orderMode, state);
|
| | | List<HelpCenter> list = helpCenterService.query(0, Integer.MAX_VALUE, key, cid, orderMode, state,acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateSort")
|
| | | public void updateSort(String callback, Integer moveType, Long id, PrintWriter out) {
|
| | | public void updateSort(AdminAcceptData acceptData, String callback, Integer moveType, Long id, PrintWriter out) {
|
| | | try {
|
| | | helpClassService.updateSort(moveType, id);
|
| | | helpClassService.updateSort(moveType, id,acceptData.getSystem());
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (HelpClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | |
|
| | | pageSize = Integer.MAX_VALUE;
|
| | | try {
|
| | | List<HelpClass> list = helpClassService.query(0, pageSize, key, showState);
|
| | | List<HelpClass> list = helpClassService.query(0, pageSize, key, showState,acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getProvidedClass")
|
| | | public void getAllClass(String callback, PrintWriter out) {
|
| | | public void getAllClass(AdminAcceptData acceptData, String callback, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | HelpClass helpClass = new HelpClass();
|
| | |
| | | List<HelpClass> reslut_list = new ArrayList<HelpClass>();
|
| | | reslut_list.add(helpClass);
|
| | |
|
| | | List<HelpClass> list = helpClassService.getProvidedClass();
|
| | | List<HelpClass> list = helpClassService.getProvidedClass(acceptData.getSystem());
|
| | | if (list != null && list.size() > 0) {
|
| | | reslut_list.addAll(list);
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushUrlAll")
|
| | | public void newPushUrlAll(String callback, String url, String title, String content, String uids, |
| | | public void newPushUrlAll(AdminAcceptData acceptData, String callback, String url, String title, String content, String uids,
|
| | | String arrayIOS, String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | *
|
| | | * 方法说明: 站内信推送 -(新后台)
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "newPushFanZNX")
|
| | | public void newPushFanZNX(String callback, String uids, String title, String content, String arrayIOS, |
| | | public void newPushFanZNX(AdminAcceptData acceptData,String callback, String uids, String title, String content, String arrayIOS,
|
| | | String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(Long.parseLong(str_uid), title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), UserSystemMsgTypeEnum.question,
|
| | | title, content, UserSystemMsg.TIME_TAG_EMERGENT, null);
|
| | |
| | | *
|
| | | * 方法说明: 百川推送 -(新后台)
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "pushBaiChuan")
|
| | | public void pushBaiChuan(String callback, String uids, String title, String content, String url, String arrayIOS,
|
| | | public void pushBaiChuan(AdminAcceptData acceptData,String callback, String uids, String title, String content, String url, String arrayIOS,
|
| | | String arrayAndroid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | } else {
|
| | | // 部分推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listIOS, listAndroid,acceptData.getSystem());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | List<PushCoupon> list = pushCouponService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state);
|
| | | List<PushCoupon> list = pushCouponService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state,acceptData.getSystem());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | |
| | | listVO.add(pushCouponVO);
|
| | | }
|
| | |
|
| | | long count = pushCouponService.countQuery(key, state);
|
| | | long count = pushCouponService.countQuery(key, state,acceptData.getSystem());
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | |
|
| | | /**
|
| | | * 推送
|
| | | * @param id 推送id
|
| | | * @param out
|
| | | * @throws Exception
|
| | | */
|
| | |
| | |
|
| | | /**
|
| | | * 版本转换为list
|
| | | * @param pushGoods
|
| | | */
|
| | | public void convertVersionList(PushCouponVO pushCouponVO) {
|
| | | String versions = pushCouponVO.getVersions();
|
| | |
| | |
|
| | | /**
|
| | | * 转换json
|
| | | * @param pushGoods
|
| | | */
|
| | | public void convertVersion(PushCoupon pushCoupon, String arrayIOS, String arrayAndroid) {
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | List<PushGoods> list = pushGoodsService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state);
|
| | | List<PushGoods> list = pushGoodsService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state,acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | convertVersionList(pushGoods);
|
| | | }
|
| | |
|
| | | long count = pushGoodsService.countQuery(key, state);
|
| | | long count = pushGoodsService.countQuery(key, state,acceptData.getSystem());
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | | /**
|
| | | * 商品推送
|
| | | *
|
| | | * @param id 推送id
|
| | | * @param out
|
| | | * @throws Exception
|
| | | */
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | @RequestMapping("admin/new/api/v1/pushInfo")
|
| | | public class PushInfoController {
|
| | |
|
| | |
|
| | | @Resource
|
| | | private PushInfoService pushInfoService;
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 新增/修改
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer keyType,
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer keyType,
|
| | | Integer state, String type, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | List<PushInfo> list = pushInfoService.listQuery((pageIndex-1) * pageSize, pageSize, key, keyType, state, type);
|
| | | List<PushInfo> list = pushInfoService.listQuery((pageIndex-1) * pageSize, pageSize, key, keyType, state, type,acceptData.getSystem());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = pushInfoService.countQuery(key, keyType, state, type);
|
| | | long count = pushInfoService.countQuery(key, keyType, state, type,acceptData.getSystem());
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | |
|
| | | /**
|
| | | * 推送
|
| | | * @param id 推送id
|
| | | * @param out
|
| | | * @throws Exception
|
| | | */
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | |
| | | * 保存信息
|
| | | *
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | |
| | | * 修改排序
|
| | | *
|
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrder")
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer sex, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer sex, PrintWriter out) {
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | List<HomeNavbar> list = homeNavbarService.listQuery((pageIndex - 1) * pageSize, pageSize, key, sex);
|
| | | List<HomeNavbar> list = homeNavbarService.listQuery((pageIndex - 1) * pageSize, pageSize, key, sex,acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = homeNavbarService.countlistQuery(key, sex);
|
| | | long count = homeNavbarService.countlistQuery(key, sex,acceptData.getSystem());
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | |
| | | if (pageId == null)
|
| | | pageId = 0L;
|
| | |
|
| | | List<HelpCenter> list1 = helpCenterService.listValid(pageId, pageSize, key, cid);
|
| | | List<HelpCenter> list1 = helpCenterService.listValid(pageId, pageSize, key, cid,acceptData.getSystem());
|
| | | List<HelpCenter> list = new ArrayList<>();
|
| | | if (list1 != null && list1.size() > 0)
|
| | | list.addAll(list1);
|
| | |
| | | try {
|
| | | List<HelpClass> resultList = new ArrayList<>();
|
| | |
|
| | | List<HelpClass> list = helpClassService.getClassByState(1);
|
| | | List<HelpClass> list = helpClassService.getClassByState(1,acceptData.getSystem());
|
| | | if (list != null && list.size() > 0) {
|
| | | resultList.addAll(list);
|
| | | }
|
| | |
| | | package com.yeshi.fanli.controller.apph5;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.homemodule.BannerVO;
|
| | | import net.sf.json.JSONObject;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.homemodule.BannerVO;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | | import javax.annotation.Resource;
|
| | | import java.io.PrintWriter;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 动态
|
| | |
| | | private SwiperPictureService swiperPictureService;
|
| | |
|
| | | @RequestMapping(value = "getpicture")
|
| | | public void getDetail(String callback, String card, PrintWriter out) {
|
| | | public void getDetail(AcceptData acceptData, String callback, String card, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(card)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("唯一标识为空"));
|
| | |
| | | }
|
| | |
|
| | |
|
| | | List<BannerVO> list = swiperPictureService.getByBannerCard(card, SystemEnum.blks);
|
| | | List<BannerVO> list = swiperPictureService.getByBannerCard(card, acceptData.getSystem());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | @RequestMapping(value = "getClass", method = RequestMethod.POST)
|
| | | public void getClass(AcceptData acceptData, PrintWriter out) {
|
| | | try {
|
| | | List<BrandClass> list = brandClassService.listBrandClassEffectiveCache();
|
| | | List<BrandClass> list = brandClassService.listBrandClassEffectiveCache(acceptData.getSystem());
|
| | | if (list == null) {
|
| | | list = new ArrayList<BrandClass>();
|
| | | }
|
| | |
| | | String version = acceptData.getVersion();
|
| | |
|
| | | AppPageNotification ap = appPageNotificationService.getValidNotificationByTypeCache(type, platform,
|
| | | Integer.parseInt(version));
|
| | | Integer.parseInt(version),acceptData.getSystem());
|
| | | if ("home".equalsIgnoreCase(type) && VersionUtil.smallerThan_1_5_1(platform, version) && ap != null) {
|
| | | AppPageNotification no = new AppPageNotification();
|
| | | no.setContentUrl("");
|
| | |
| | |
|
| | | List<HomeNavbar> list = new ArrayList<HomeNavbar>();
|
| | |
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryDefaultNavbar(0);
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryDefaultNavbar(0,acceptData.getSystem());
|
| | | if (listNavbar != null) {
|
| | | list.addAll(listNavbar);
|
| | | }
|
| | |
| | |
|
| | | // 设备注册时间
|
| | | Date createTime = deviceActive.getCreateTime();
|
| | | count = pushGoodsService.countHistoryByPushTime(uid, createTime);
|
| | | count = pushGoodsService.countHistoryByPushTime(uid, createTime,acceptData.getSystem());
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | List<PushGoods> list = pushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime);
|
| | | List<PushGoods> list = pushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime,acceptData.getSystem());
|
| | | if (list == null)
|
| | | list = new ArrayList<>();
|
| | |
|
| | |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param page
|
| | | * @param type
|
| | | * @param out
|
| | | */
|
| | | @RequestSerializableByKey(key = "#acceptData.device")
|
| | |
| | | if (deviceActive != null) {
|
| | | // 设备注册时间
|
| | | Date createTime = deviceActive.getCreateTime();
|
| | | List<PushGoods> list = pushGoodsService.listHistoryByPushTime(0, 1, uid, createTime);
|
| | | List<PushGoods> list = pushGoodsService.listHistoryByPushTime(0, 1, uid, createTime, acceptData.getSystem());
|
| | | if (list != null && list.size() > 0) {
|
| | | MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType(
|
| | | UserCommonMsgVO.TYPE_RECOMMEND, acceptData.getDevice(),
|
| | |
| | |
|
| | | /**
|
| | | * 删除消息
|
| | | *
|
| | | * @param acceptData
|
| | | * @param type
|
| | | * @param id
|
| | |
| | | List<FloatAD> listAD = new ArrayList<FloatAD>();
|
| | | List<FloatImgDetailVO> listVO = new ArrayList<FloatImgDetailVO>();
|
| | | List<FloatAD> list = floatADService.getValidFloatADCache(FloatAD.POSITION_INDEX, null, platform,
|
| | | Integer.parseInt(version));
|
| | | Integer.parseInt(version),acceptData.getSystem());
|
| | | if (list != null && !list.isEmpty())
|
| | | listAD.addAll(list);
|
| | |
|
| | |
| | | List<GoodsEvaluate> listNew = new ArrayList<GoodsEvaluate>(); |
| | | |
| | | List<GoodsEvaluate> list = goodsEvaluateService.queryMaterialsCache((page - 1) * Constant.PAGE_SIZE, |
| | | Constant.PAGE_SIZE, type); |
| | | Constant.PAGE_SIZE, type,acceptData.getSystem()); |
| | | |
| | | if (!VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | listNew.addAll(list); |
| | |
| | | } |
| | | }); |
| | | Gson gson = gsonBuilder.create(); |
| | | long count = goodsEvaluateService.countValidMaterials(type); |
| | | long count = goodsEvaluateService.countValidMaterials(type,acceptData.getSystem()); |
| | | |
| | | JSONArray jsonArray = new JSONArray(); |
| | | |
| | |
| | |
|
| | | /**
|
| | | * // 云发单文案信息
|
| | | *
|
| | | * @param goodsDetail
|
| | | */
|
| | | private void getCloudInfo(AcceptData acceptData,Long uid, GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | GoodsEvaluate evaluate = goodsEvaluateService.queryExistSingle(goodsDetail.getGoodsId() +"", goodsDetail.getGoodsType());
|
| | | GoodsEvaluate evaluate = goodsEvaluateService.queryExistSingle(goodsDetail.getGoodsId() + "", goodsDetail.getGoodsType(), acceptData.getSystem());
|
| | | if (evaluate != null) {
|
| | | String cloudText = null;
|
| | | List<CommentInfo> comments = evaluate.getComments();
|
| | |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param id
|
| | | * @param couponUrl
|
| | | * -优惠券链接
|
| | | * @param couponUrl -优惠券链接
|
| | | * @param source
|
| | | * @param out
|
| | | */
|
| | |
| | | /**
|
| | | * 是否在参与推广
|
| | | *
|
| | | * @param goodsId
|
| | | * -商品ID
|
| | | * @param goodsType
|
| | | * -TB/JD
|
| | | * @param goodsId -商品ID
|
| | | * @param goodsType -TB/JD
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "isGoodsExtend")
|
| | |
| | |
|
| | | /**
|
| | | * 京东转链
|
| | | * @Title: getJDLink
|
| | | * @Description: |
| | | *
|
| | | * @param acceptData
|
| | | * @param link
|
| | | * @param uid
|
| | | * @param out |
| | | * void 返回类型
|
| | | * @param out void 返回类型
|
| | | * @throws
|
| | | * @Title: getJDLink
|
| | | * @Description:
|
| | | */
|
| | | @RequestMapping(value = "convertJDLink")
|
| | | public void convertJDLink(AcceptData acceptData, String link, Long uid, String callback, PrintWriter out) {
|
| | |
| | | List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
|
| | |
|
| | | // 系统默认导航栏
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar();
|
| | | List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar(acceptData.getSystem());
|
| | | if (listNavbar != null && listNavbar.size() > 0) {
|
| | | listItems.addAll(listNavbar);
|
| | | }
|
| | |
| | | List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
|
| | |
|
| | |
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice());
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice(),acceptData.getSystem());
|
| | | if (listNavbar != null && listNavbar.size() > 0) {
|
| | | listItems.addAll(listNavbar);
|
| | | }
|
| | |
| | | try {
|
| | | List<String> listIOS = new ArrayList<String>();
|
| | | List<String> listAndroid = new ArrayList<String>();
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(remindId, UserSystemMsgTypeEnum.common, title, content,
|
| | | UserSystemMsg.TIME_TAG_COMMON, null);
|
| | |
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(Constant.SOURCE_TYPE_TAOBAO, orderId,
|
| | | BigDecimal.ZERO);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null,acceptData.getSystem());
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | AppPageNotification ap = null;
|
| | | if (page == 1) {
|
| | | ap = appPageNotificationService.getValidNotificationByTypeCache(notifyType, acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | // 没有通知
|
| | | if (ap == null || !ap.getShow()) {
|
| | | ap = null;
|
| | |
| | | out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap)));
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 拼多多
|
| | | * |
| | | * @param kw
|
| | | * @param acceptData
|
| | | * @param key
|
| | | * @param page
|
| | | * @param filter
|
| | | * @param order
|
| | | * @param startprice
|
| | | * @param endprice
|
| | | * @return
|
| | | * @param ap
|
| | | * @param out
|
| | | */
|
| | | private void searchPDDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order,
|
| | | AppPageNotification ap, PrintWriter out) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | GoodsEvaluate evaluate = goodsEvaluateService.queryExistSingle(goodsId, goodsType);
|
| | | GoodsEvaluate evaluate = goodsEvaluateService.queryExistSingle(goodsId, goodsType,acceptData.getSystem());
|
| | | if (evaluate != null) {
|
| | | userCloudService.sendByDynamic(uid, evaluate.getId());
|
| | | } else {
|
| | |
| | | List<FloatAD> listAD = new ArrayList<FloatAD>();
|
| | | List<FloatImgDetailVO> listVO = new ArrayList<FloatImgDetailVO>();
|
| | | List<FloatAD> list = floatADService.getValidFloatADCache(FloatAD.POSITION_INDEX, null, platform,
|
| | | Integer.parseInt(version));
|
| | | Integer.parseInt(version),acceptData.getSystem());
|
| | | if (list != null && !list.isEmpty())
|
| | | listAD.addAll(list);
|
| | |
|
| | |
| | | try {
|
| | | List<String> listIOS = new ArrayList<String>();
|
| | | List<String> listAndroid = new ArrayList<String>();
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(remindId, UserSystemMsgTypeEnum.common, title, content,
|
| | | UserSystemMsg.TIME_TAG_COMMON, null);
|
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | |
| | | mongoTemplate.save(record); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 状态切换 |
| | | * |
| | | * @param record |
| | | * @param id |
| | | * @param state |
| | | */ |
| | | public void updateSatate(String id, int state) { |
| | | Query query = new Query(); |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum) { |
| | | public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum, SystemEnum system) { |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(dynamicType)); |
| | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(typeEnum)) |
| | | list.add(Criteria.where("type").is(typeEnum)); |
| | | |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | |
| | | if (!StringUtil.isNullOrEmpty(key)) |
| | | list.add(new Criteria().orOperator( |
| | |
| | | return mongoTemplate.find(query, GoodsEvaluate.class); |
| | | } |
| | | |
| | | public long count(String key, Integer state, int dynamicType, String typeEnum) { |
| | | public long count(String key, Integer state, int dynamicType, String typeEnum, SystemEnum system) { |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(dynamicType)); |
| | |
| | | if (state != null) { |
| | | list.add(Criteria.where("state").is(state)); |
| | | } |
| | | |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | |
| | | if (!StringUtil.isNullOrEmpty(typeEnum)) |
| | | list.add(Criteria.where("type").is(typeEnum)); |
| | |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryValid(int start, int count, int dynamicType) { |
| | | public List<GoodsEvaluate> queryValid(int start, int count, int dynamicType,SystemEnum system) { |
| | | Date now = new Date(); |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("startTime").lte(now)); |
| | | list.add(Criteria.where("endTime").gte(now)); |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | |
| | | if (list.size() > 0) { |
| | | Criteria[] cas = new Criteria[list.size()]; |
| | |
| | | |
| | | /** |
| | | * 统计有效 |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public long countValid(int dynamicType) { |
| | | public long countValid(int dynamicType,SystemEnum system) { |
| | | Date now = new Date(); |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("startTime").lte(now)); |
| | | list.add(Criteria.where("endTime").gte(now)); |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | |
| | | if (list.size() > 0) { |
| | | Criteria[] cas = new Criteria[list.size()]; |
| | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> querySingleExist() { |
| | | public List<GoodsEvaluate> querySingleExist(SystemEnum system) { |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | |
| | | list.add(Criteria.where("dynamicType").is(1)); |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("goods.goodsType").is(1)); |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | |
| | | if (list.size() > 0) { |
| | | Criteria[] cas = new Criteria[list.size()]; |
| | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @param goodsType |
| | | * @param goodsId |
| | | * @param system |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryExist(int goodsType, String goodsId) { |
| | | public List<GoodsEvaluate> queryExist(int goodsType, String goodsId,SystemEnum system) { |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(1)); |
| | | list.add(Criteria.where("state").is(1)); |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | list.add(Criteria.where("imgList.goods.goodsId").is(goodsId)); |
| | | list.add(Criteria.where("imgList.goods.goodsType").is(goodsType)); |
| | | |
| | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryExistSingle(int goodsType, String goodsId) { |
| | | public List<GoodsEvaluate> queryExistSingle(int goodsType, String goodsId,SystemEnum system) { |
| | | Query query = new Query(); |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(1)); |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("type").is("single")); |
| | | if(system!=null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | list.add(Criteria.where("imgList.goods.goodsId").is(goodsId)); |
| | | list.add(Criteria.where("imgList.goods.goodsType").is(goodsType)); |
| | | |
| | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryOverdue() { |
| | |
| | | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> removeDownGoods() { |
| | |
| | | * 查询有效-倒序 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryValidSortASC(int start, int count, EvaluateEnum tyepEnum, boolean sortDesc) { |
| | |
| | | |
| | | |
| | | /** |
| | | * 查询有效 |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * |
| | | * @param goodsType |
| | | * @param goodsId |
| | | * @param limitTime |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryExistLimitTime(int goodsType, String goodsId, Date limitTime) { |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | * 查询品牌分类
|
| | | * @return
|
| | | */
|
| | | List<BrandClass> listEffective();
|
| | | List<BrandClass> listEffective(@Param("system")SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 排序
|
| | |
| | |
|
| | | /**
|
| | | * 获取相邻序号
|
| | | * @param position
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | |
| | | * @return
|
| | | */
|
| | | List<BrandClass> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key,
|
| | | @Param("state") Integer state);
|
| | | @Param("state") Integer state,@Param("system") SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state);
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state,@Param("system")SystemEnum system);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.brand; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.brand.BrandClassSystemMap; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import java.util.List; |
| | | |
| | | public interface BrandClassSystemMapMapper extends BaseMapper<BrandClassSystemMap> { |
| | | List<BrandClassSystemMap> listByClassIdsAndSystem(@Nullable @Param("classIdList") List<Long> idList, @Param("system") SystemEnum system); |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.common; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.config.CommonConfig; |
| | | |
| | | public interface CommonConfigMapper extends BaseMapper<CommonConfig> { |
| | | |
| | | CommonConfig selectByKey(String key); |
| | | |
| | | } |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.help.AppPageNotification;
|
| | |
| | |
|
| | | AppPageNotification selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 通过类型获取通知
|
| | | * |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | AppPageNotification selectByType(String type);
|
| | |
|
| | | /**
|
| | | * 通过类型获取有效通知
|
| | | * |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | List<AppPageNotification> listValidByType(String type);
|
| | |
|
| | | int updateByPrimaryKeySelective(AppPageNotification record);
|
| | |
|
| | |
| | | int deleteBatchByPrimaryKey(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 通过类型获取通知
|
| | | * |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | AppPageNotification selectByType(@Param("type") String type,@Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 通过类型获取有效通知
|
| | | * |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | List<AppPageNotification> listValidByType(@Param("type") String type,@Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 后端列表查询
|
| | | * @return
|
| | | */
|
| | | List<AppPageNotification> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key,
|
| | | @Param("show") Integer show, @Param("canClose") Integer canClose);
|
| | | @Param("show") Integer show, @Param("canClose") Integer canClose,@Param("system") SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("show") Integer show, @Param("canClose") Integer canClose);
|
| | | long countQuery(@Param("key") String key, @Param("show") Integer show, @Param("canClose") Integer canClose,@Param("system") SystemEnum system);
|
| | | } |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | * @return
|
| | | */
|
| | | List<HelpCenter> listValid(@Param("pageId") Long pageId, @Param("count") int count,
|
| | | @Param("key") String title, @Param("cid") Long cid);
|
| | | @Param("key") String title, @Param("cid") Long cid,@Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | List<HelpCenter> query(@Param("start") int start, @Param("count") int count,
|
| | | @Param("key") String title, @Param("cid") Long cid,
|
| | | @Param("orderMode") Integer orderMode, @Param("state") Integer state);
|
| | | @Param("orderMode") Integer orderMode, @Param("state") Integer state,@Param("system") SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String title, @Param("cid") Long cid, @Param("state") Integer state);
|
| | | long countQuery(@Param("key") String title, @Param("cid") Long cid, @Param("state") Integer state,@Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 批量删除
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | * @return
|
| | | */
|
| | | List<HelpClass> listQuery(@Param("start") long start, @Param("count") int count,
|
| | | @Param("key") String key, @Param("state") Integer state);
|
| | | @Param("key") String key, @Param("state") Integer state, @Param("system") SystemEnum system );
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state);
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state, @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param sort 排序值
|
| | | * @return
|
| | | */
|
| | | HelpClass getChangeOrder(@Param("type") Integer type, @Param("sort") Integer sort);
|
| | | HelpClass getChangeOrder(@Param("type") Integer type, @Param("sort") Integer sort, @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | List<HelpClass> getClassByState(@Param("state") Integer state);
|
| | | List<HelpClass> getClassByState(@Param("state") Integer state, @Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 查询所有分类 提供筛选
|
| | | * @return
|
| | | */
|
| | | List<HelpClass> getProvidedClass();
|
| | | List<HelpClass> getProvidedClass( @Param("system") SystemEnum system);
|
| | | } |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | List<HomeNavbar> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key, @Param("sex") Integer sex);
|
| | | List<HomeNavbar> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key, @Param("sex") Integer sex, @Param("system") SystemEnum system);
|
| | |
|
| | | long countListQuery(@Param("key") String key, @Param("sex") Integer sex);
|
| | | long countListQuery(@Param("key") String key, @Param("sex") Integer sex, @Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 查询有效导航栏
|
| | | * @return
|
| | | */
|
| | | List<HomeNavbar> listQueryEffective();
|
| | | List<HomeNavbar> listQueryEffective( @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 默认导航栏
|
| | | * @return
|
| | | */
|
| | | List<HomeNavbar> listQueryDefaultNavbar(@Param("sex") Integer sex);
|
| | | List<HomeNavbar> listQueryDefaultNavbar(@Param("sex") Integer sex, @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 固定导航栏
|
| | | * @return
|
| | | */
|
| | | List<HomeNavbar> listQueryFixedNavbar();
|
| | | List<HomeNavbar> listQueryFixedNavbar( @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param classId
|
| | | * @return
|
| | | */
|
| | | HomeNavbar getEffectiveByClassId(@Param("classId") Long classId);
|
| | | HomeNavbar getEffectiveByClassId(@Param("classId") Long classId, @Param("system") SystemEnum system);
|
| | |
|
| | | } |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | * @return
|
| | | */
|
| | | List<PushCoupon> listQuery(@Param("start") long start, @Param("count") int count,
|
| | | @Param("key") String key, @Param("state") Integer state);
|
| | | @Param("key") String key, @Param("state") Integer state, @Param("system")SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state);
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state, @Param("system")SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 有效活动
|
| | | * @return
|
| | | */
|
| | | List<PushCoupon> listQueryEffective();
|
| | | List<PushCoupon> listQueryEffective(@Param("system")SystemEnum system);
|
| | | } |
| | |
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | |
| | | * @return
|
| | | */
|
| | | List<PushGoods> listQuery(@Param("start") long start, @Param("count") int count,
|
| | | @Param("key") String key, @Param("state") Integer state);
|
| | | @Param("key") String key, @Param("state") Integer state, @Param("system") SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state);
|
| | | long countQuery(@Param("key") String key, @Param("state") Integer state, @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @return
|
| | | */
|
| | | List<PushGoods> listHistoryByPushTime(@Param("start") long start, @Param("count") int count,
|
| | | @Param("uid") Long uid, @Param("pushTime") Date pushTime);
|
| | | @Param("uid") Long uid, @Param("pushTime") Date pushTime, @Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 统计历史推送商品信息
|
| | | * @param start
|
| | | * @param count
|
| | | * @param uid
|
| | | * @param pushTime
|
| | | * @param system
|
| | | * @return
|
| | | */
|
| | | long countHistoryByPushTime(@Param("uid") Long uid, @Param("pushTime") Date pushTime);
|
| | | long countHistoryByPushTime(@Param("uid") Long uid, @Param("pushTime") Date pushTime, @Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 查询已推送记录
|
| | |
| | | * 需要执行推送的任务
|
| | | * @return
|
| | | */
|
| | | List<PushGoods> listTask();
|
| | | List<PushGoods> listTask( @Param("system") SystemEnum system);
|
| | |
|
| | | } |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | |
| | | */
|
| | | List<PushInfo> listQuery(@Param("start") long start, @Param("count") int count,
|
| | | @Param("key") String key, @Param("keyType") Integer keyType, @Param("state") Integer state
|
| | | , @Param("type")String type);
|
| | | , @Param("type")String type, @Param("system") SystemEnum system);
|
| | |
|
| | | long countQuery(@Param("key") String key, @Param("keyType") Integer keyType,
|
| | | @Param("state") Integer state, @Param("type")String type);
|
| | | @Param("state") Integer state, @Param("type")String type, @Param("system") SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 需要执行推送的任务
|
| | | * @return
|
| | | */
|
| | | List<PushInfo> listTask();
|
| | | List<PushInfo> listTask(@Param("system") SystemEnum system);
|
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.push; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PushBaseContent { |
| | | private String title; |
| | | private String content; |
| | | private List<Integer> versionCodeList; |
| | | private SystemEnum system; |
| | | |
| | | |
| | | public PushBaseContent() { |
| | | } |
| | | |
| | | public PushBaseContent(String title, String content, List<Integer> versionCodeList, SystemEnum system) { |
| | | this.title = title; |
| | | this.content = content; |
| | | this.versionCodeList = versionCodeList; |
| | | this.system = system; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public List<Integer> getVersionCodeList() { |
| | | return versionCodeList; |
| | | } |
| | | |
| | | public void setVersionCodeList(List<Integer> versionCodeList) { |
| | | this.versionCodeList = versionCodeList; |
| | | } |
| | | |
| | | public SystemEnum getSystem() { |
| | | return system; |
| | | } |
| | | |
| | | public void setSystem(SystemEnum system) { |
| | | this.system = system; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.brand; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import org.yeshi.utils.mybatis.Column; |
| | | import org.yeshi.utils.mybatis.Table; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Table("yeshi_ec_brand_class_system_map") |
| | | public class BrandClassSystemMap { |
| | | @Column(name="sm_id") |
| | | private Long id; |
| | | @Column(name="sm_system") |
| | | private SystemEnum system; |
| | | @Column(name="sm_brand_class_id") |
| | | private BrandClass brandClass; |
| | | @Column(name="sm_create_time") |
| | | private Date createTime; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public SystemEnum getSystem() { |
| | | return system; |
| | | } |
| | | |
| | | public void setSystem(SystemEnum system) { |
| | | this.system = system; |
| | | } |
| | | |
| | | public BrandClass getBrandClass() { |
| | | return brandClass; |
| | | } |
| | | |
| | | public void setBrandClass(BrandClass brandClass) { |
| | | this.brandClass = brandClass; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | |
| | |
|
| | | @Column(name = "an_updatetime")
|
| | | private Date updateTime;// 更新时间
|
| | | //系统
|
| | | @Column(name = "an_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | @Transient // 页面名称
|
| | | private String pageName;
|
| | |
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.format.annotation.DateTimeFormat;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | |
|
| | |
| | | @Column(name = "h_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | |
|
| | | @Column(name = "h_system")
|
| | | private SystemEnum system; //系统
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | |
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | |
| | | @Column(name = "hc_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | //系统
|
| | | @Column(name = "hc_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | private String startTime_str;
|
| | | private String endTime_str;
|
| | |
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | |
| | | @Column(name = "br_params")
|
| | | private String params;
|
| | |
|
| | |
|
| | | @Column(name = "br_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | // 起始时间
|
| | | private String startTime_str;
|
| | | // 结束时间
|
New file |
| | |
| | | package com.yeshi.fanli.entity.config; |
| | | |
| | | import org.yeshi.utils.mybatis.Column; |
| | | import org.yeshi.utils.mybatis.Table; |
| | | |
| | | /** |
| | | * 通用配置 |
| | | */ |
| | | @Table("yeshi_ec_common_config") |
| | | public class CommonConfig { |
| | | |
| | | @Column(name = "id") |
| | | private Long id; |
| | | @Column(name = "key") |
| | | private String key; |
| | | @Column(name = "value") |
| | | private String value; |
| | | @Column(name = "name") |
| | | private String name; |
| | | @Column(name = "beizhu") |
| | | private String beizhu; |
| | | @Column(name = "createtime") |
| | | private String createtime; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(String key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getBeizhu() { |
| | | return beizhu; |
| | | } |
| | | |
| | | public void setBeizhu(String beizhu) { |
| | | this.beizhu = beizhu; |
| | | } |
| | | |
| | | public String getCreatetime() { |
| | | return createtime; |
| | | } |
| | | |
| | | public void setCreatetime(String createtime) { |
| | | this.createtime = createtime; |
| | | } |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | |
| | | * 动态商品测评 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Document(collection = "goods_evaluate") |
| | | public class GoodsEvaluate implements Serializable { |
| | |
| | | @Field("zeroPoint") |
| | | private Integer zeroPoint; // 是否0点活动-10点进行发圈 1-是 |
| | | |
| | | @Field("system") |
| | | private SystemEnum system; // 系统 |
| | | |
| | | |
| | | @Expose |
| | | @Field("jumpLink") |
| | | private String jumpLink; |
| | |
| | | // 备注 |
| | | private String remarks; |
| | | |
| | | |
| | | public SystemEnum getSystem() { |
| | | return system; |
| | | } |
| | | |
| | | public void setSystem(SystemEnum system) { |
| | | this.system = system; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.format.annotation.DateTimeFormat;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
| | | @Column(name = "pc_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | @Column(name = "pc_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public PushCoupon() {
|
| | | }
|
| | |
|
| | |
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | |
| | | // 浏览次数
|
| | | @Column(name = "pg_scan_num")
|
| | | private Integer scanNum;
|
| | | //系统
|
| | | @Column(name = "pg_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | // 定时时间
|
| | | private String controlTime_str;
|
| | |
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | |
| | | @Column(name = "pi_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | @Column(name = "pi_system")
|
| | | private SystemEnum system;
|
| | |
|
| | | public SystemEnum getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemEnum system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | // 推送URL
|
| | | private String url;
|
| | | // 是否定时
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.commons.lang.StringEscapeUtils;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @Title: demoJobHandler @Description: 更新小程序动态商品 @param
|
| | | * param @return @throws Exception ReturnT<String> 返回类型 @throws
|
| | | */
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | goodsEvaluateService.addRanDomShareCount();
|
| | | for (SystemEnum system : SystemEnum.values())
|
| | | goodsEvaluateService.addRanDomShareCount(system);
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | |
|
| | | /**
|
| | | * 好单库商品加入发圈
|
| | | *
|
| | | * @return
|
| | | */
|
| | | private boolean addHDKListSelected () {
|
| | |
| | | List<ActivityRuleUser> ruleList = activityUserService.listByRuleCode(ActivityRuleUser.RULE_HAOHUO, 1, 20);
|
| | | ActivityUser user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | |
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoGoodsFactory.create(hdkGoods), pics, user, showtitle);
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoGoodsFactory.create(hdkGoods), pics, user, showtitle, SystemEnum.blks);
|
| | | if (addProcess == 0) {
|
| | | addResult = true;
|
| | | break;
|
| | |
| | |
|
| | | /**
|
| | | * 大淘客商品加入发圈
|
| | | *
|
| | | * @return
|
| | | */
|
| | | private boolean addDTKFriendsFircleList() {
|
| | |
| | | user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | | }
|
| | |
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoUtil.convert(tkGoods), null, user, showtitle);
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoUtil.convert(tkGoods), null, user, showtitle, SystemEnum.blks);
|
| | | if (addProcess == 0) {
|
| | | addResult = true;
|
| | | break;
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | |
| | | * 金币任务
|
| | | *
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Component
|
| | | public class IntegralTaskJob {
|
| | |
| | |
|
| | | @Resource
|
| | | private IntegralTaskClassService integralTaskClassService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | /**
|
| | | * 推送签到提醒(每天15点半查询)
|
| | |
| | | long todayCount = integralTaskRecordService.countByCidAndUidAndCreateTime(cid, record.getUid(),
|
| | | todayMinTime, todayMaxTime);
|
| | | if (todayCount <= 0) {// 如果未签到,需要推送信息
|
| | | SystemEnum system = userInfoService.getUserSystem(record.getUid());
|
| | | try {
|
| | | pushService.pushUserSignInNotification(record.getUid(), "今日未签到提醒", "今日还未签到,连续签到金币翻倍哦", null,
|
| | | null);
|
| | | null,system);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 定时消息推送任务 每个30秒爬取
|
| | | */
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | for (SystemEnum system : SystemEnum.values()) {
|
| | |
|
| | | // 站内信、网页、百川
|
| | | try {
|
| | | List<PushInfo> listTask = pushInfoService.listTask();
|
| | | List<PushInfo> listTask = pushInfoService.listTask(system);
|
| | | if (listTask != null && listTask.size() > 0) {
|
| | | for (PushInfo pushInfo: listTask) {
|
| | | pushInfoService.taskPush(pushInfo);
|
| | |
| | |
|
| | | // 今日推荐
|
| | | try {
|
| | | List<PushGoods> listTask = pushGoodsService.listTask();
|
| | | List<PushGoods> listTask = pushGoodsService.listTask(system);
|
| | | if (listTask != null && listTask.size() > 0) {
|
| | | for (PushGoods pushGoods: listTask) {
|
| | | pushGoodsService.taskPush(pushGoods);
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_brand_class where bc_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_brand_class where bc_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_class (bc_id,bc_name,bc_gclass_id,bc_state,bc_orderby,bc_create_time,bc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{goodsClass.id,jdbcType=BIGINT},#{state,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.brand.BrandClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_class
|
| | | <delete id="deleteByPrimaryKey"
|
| | | parameterType="java.lang.Long">delete from yeshi_ec_brand_class where bc_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandClass" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_brand_class (bc_id,bc_name,bc_gclass_id,bc_state,bc_orderby,bc_create_time,bc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{goodsClass.id,jdbcType=BIGINT},#{state,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.brand.BrandClass" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_brand_class
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">bc_id,</if>
|
| | | <if test="name != null">bc_name,</if>
|
| | |
| | | <if test="orderBy != null">bc_orderby,</if>
|
| | | <if test="createTime != null">bc_create_time,</if>
|
| | | <if test="updateTime != null">bc_update_time,</if>
|
| | | </trim>values
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.brand.BrandClass">update yeshi_ec_brand_class set bc_name = #{name,jdbcType=VARCHAR},bc_gclass_id = #{goodsClass.id,jdbcType=BIGINT},bc_state = #{state,jdbcType=INTEGER},bc_orderby = #{orderBy,jdbcType=INTEGER},bc_create_time = #{createTime,jdbcType=TIMESTAMP},bc_update_time = #{updateTime,jdbcType=TIMESTAMP} where bc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.brand.BrandClass">update yeshi_ec_brand_class
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.brand.BrandClass">update yeshi_ec_brand_class set bc_name = #{name,jdbcType=VARCHAR},bc_gclass_id = #{goodsClass.id,jdbcType=BIGINT},bc_state = #{state,jdbcType=INTEGER},bc_orderby = #{orderBy,jdbcType=INTEGER},bc_create_time = #{createTime,jdbcType=TIMESTAMP},bc_update_time = #{updateTime,jdbcType=TIMESTAMP} where bc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.brand.BrandClass">update
|
| | | yeshi_ec_brand_class
|
| | | <set>
|
| | | <if test="name != null">bc_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsClass != null">bc_gclass_id=#{goodsClass.id,jdbcType=BIGINT},</if>
|
| | |
| | | <if test="orderBy != null">bc_orderby=#{orderBy,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">bc_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">bc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where bc_id = #{id,jdbcType=BIGINT}
|
| | | </set>
|
| | | where bc_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
|
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
|
| | | delete from yeshi_ec_brand_class WHERE bc_id in
|
| | | <foreach collection="list" item="item" open="(" close=")"
|
| | | separator=",">#{item}</foreach>
|
| | | separator=",">#{item}
|
| | | </foreach>
|
| | | </delete>
|
| | |
|
| | | <select id="listEffective" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_brand_class |
| | | SELECT * FROM yeshi_ec_brand_class left join yeshi_ec_brand_class_system_map m on m.sm_brand_class_id=bc_id
|
| | | WHERE bc_state = 1
|
| | | <if test="system!=null">
|
| | | AND sm_system=#{system}
|
| | | </if>
|
| | | ORDER BY bc_orderby
|
| | | </select>
|
| | |
|
| | |
| | | </select>
|
| | |
|
| | | <select id="getByAdjoinOrder" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_brand_class
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_brand_class
|
| | | WHERE 1=1
|
| | | <if test="type == -1">
|
| | | AND bc_orderby <![CDATA[<]]> #{order}
|
| | |
| | | </select>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_brand_class
|
| | | WHERE 1=1 |
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_brand_class left join yeshi_ec_brand_class_system_map m on m.sm_brand_class_id=bc_id
|
| | | WHERE 1=1 AND sm_system=#{system}
|
| | | <if test="key != null and key !='' ">
|
| | | AND bc_name LIKE '%${key}%'
|
| | | </if>
|
| | |
| | | </select>
|
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(COUNT(bc_id),0) FROM yeshi_ec_brand_class
|
| | | WHERE 1=1 |
| | | SELECT IFNULL(COUNT(bc_id),0) FROM yeshi_ec_brand_class left join yeshi_ec_brand_class_system_map m on m.sm_brand_class_id=bc_id
|
| | | WHERE 1=1 AND sm_system=#{system}
|
| | | <if test="key != null and key !='' ">
|
| | | AND bc_name LIKE '%${key}%'
|
| | | </if>
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!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.brand.BrandClassSystemMapMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.brand.BrandClassSystemMap"> |
| | | <id column="sm_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="sm_system" property="system" jdbcType="VARCHAR"/> |
| | | <result column="sm_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <association property="brandClass" javaType="com.yeshi.fanli.entity.brand.BrandClass" |
| | | column="sm_brand_class_id"> |
| | | <id column="sm_brand_class_id" property="id" jdbcType="BIGINT"></id> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sm_id,sm_system,sm_brand_class_id,sm_create_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_brand_class_system_map where sm_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByClassIdsAndSystem" resultMap="BaseResultMap" >select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_brand_class_system_map where sm_system = #{system} |
| | | <if test="classIdList!=null"> |
| | | <foreach collection="" item="classId" separator=" or " open=" and (" close=")"> |
| | | sm_brand_class_id=#{classId} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from yeshi_ec_brand_class_system_map where sm_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandClassSystemMap" useGeneratedKeys="true" |
| | | keyProperty="id">insert into yeshi_ec_brand_class_system_map (sm_id,sm_system,sm_brand_class_id,sm_create_time) values (#{id,jdbcType=BIGINT},#{system,jdbcType=VARCHAR},#{brandClass.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.brand.BrandClassSystemMap" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_class_system_map |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sm_id,</if> |
| | | <if test="system != null">sm_system,</if> |
| | | <if test="brandClass != null">sm_brand_class_id,</if> |
| | | <if test="createTime != null">sm_create_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if> |
| | | <if test="brandClass != null">#{brandClass.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.brand.BrandClassSystemMap">update yeshi_ec_brand_class_system_map set sm_system = #{system,jdbcType=VARCHAR},sm_brand_class_id = #{brandClass.id,jdbcType=BIGINT},sm_create_time = #{createTime,jdbcType=TIMESTAMP} where sm_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.brand.BrandClassSystemMap">update |
| | | yeshi_ec_brand_class_system_map |
| | | <set> |
| | | <if test="system != null">sm_system=#{system,jdbcType=VARCHAR},</if> |
| | | <if test="brandClass != null">sm_brand_class_id=#{brandClass.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">sm_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where sm_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!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.common.CommonConfigMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.config.CommonConfig"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="key" property="key" jdbcType="VARCHAR"/> |
| | | <result column="value" property="value" jdbcType="VARCHAR"/> |
| | | <result column="name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="beizhu" property="beizhu" jdbcType="VARCHAR"/> |
| | | <result column="createtime" property="createtime" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">id,key,value,name,beizhu,createtime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_common_config where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByKey" resultMap="BaseResultMap" parameterType="java.lang.String">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_common_config where `key` = #{0} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from yeshi_ec_common_config where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.config.CommonConfig" useGeneratedKeys="true" |
| | | keyProperty="id">insert into yeshi_ec_common_config (id,key,value,name,beizhu,createtime) values (#{id,jdbcType=BIGINT},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{beizhu,jdbcType=VARCHAR},#{createtime,jdbcType=VARCHAR})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.config.CommonConfig" useGeneratedKeys="true" |
| | | keyProperty="id">insert into yeshi_ec_common_config |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="key != null">key,</if> |
| | | <if test="value != null">value,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="beizhu != null">beizhu,</if> |
| | | <if test="createtime != null">createtime,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="key != null">#{key,jdbcType=VARCHAR},</if> |
| | | <if test="value != null">#{value,jdbcType=VARCHAR},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="beizhu != null">#{beizhu,jdbcType=VARCHAR},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.config.CommonConfig">update yeshi_ec_common_config set key = #{key,jdbcType=VARCHAR},value = #{value,jdbcType=VARCHAR},name = #{name,jdbcType=VARCHAR},beizhu = #{beizhu,jdbcType=VARCHAR},createtime = #{createtime,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.config.CommonConfig">update |
| | | yeshi_ec_common_config |
| | | <set> |
| | | <if test="key != null">key=#{key,jdbcType=VARCHAR},</if> |
| | | <if test="value != null">value=#{value,jdbcType=VARCHAR},</if> |
| | | <if test="name != null">name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="beizhu != null">beizhu=#{beizhu,jdbcType=VARCHAR},</if> |
| | | <if test="createtime != null">createtime=#{createtime,jdbcType=VARCHAR},</if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="an_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="an_begin_time" property="beginTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="an_end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="an_system" property="system" jdbcType="VARCHAR" />
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime
|
| | | <sql id="Base_Column_List">an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime,an_system
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | |
| | | parameterType="java.lang.String">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_apppage_notification where an_type = #{0}
|
| | | from yeshi_ec_apppage_notification where an_type = #{type} and an_system=#{system}
|
| | | </select>
|
| | |
|
| | | <select id="listValidByType" resultMap="BaseResultMap" parameterType="java.lang.String">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_apppage_notification
|
| | | WHERE an_type = #{0} AND an_show = 1 |
| | | WHERE an_type = #{type} AND an_system=#{system} AND an_show = 1
|
| | | AND IF(an_begin_time IS NULL,TRUE, an_begin_time<![CDATA[<=]]> NOW())
|
| | | AND IF(an_end_time IS NULL,TRUE, an_end_time <![CDATA[>=]]> NOW())
|
| | | </select>
|
| | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_apppage_notification
|
| | | (an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime)
|
| | | (an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime,an_system)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{show,jdbcType=BOOLEAN},#{canClose,jdbcType=BOOLEAN},#{content,jdbcType=VARCHAR},#{contentUrl,jdbcType=VARCHAR},#{md5,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{beginTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
| | | (#{id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{show,jdbcType=BOOLEAN},#{canClose,jdbcType=BOOLEAN},#{content,jdbcType=VARCHAR},#{contentUrl,jdbcType=VARCHAR},#{md5,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{beginTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{system,jdbcType=VARCHAR})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | |
| | | <if test="beginTime != null">an_begin_time,</if>
|
| | | <if test="endTime != null">an_end_time,</if>
|
| | | <if test="updateTime != null">an_updatetime,</if>
|
| | | <if test="system != null">an_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | |
| | | <if test="beginTime != null">#{beginTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification">update
|
| | |
| | | #{contentUrl,jdbcType=VARCHAR},an_md5 =
|
| | | #{md5,jdbcType=VARCHAR},an_createtime =
|
| | | #{createTime,jdbcType=TIMESTAMP},an_begin_time = #{beginTime,jdbcType=TIMESTAMP},an_end_time = #{endTime,jdbcType=TIMESTAMP},an_updatetime =
|
| | | #{updateTime,jdbcType=TIMESTAMP} where an_id = #{id,jdbcType=BIGINT}
|
| | | #{updateTime,jdbcType=TIMESTAMP},an_system =
|
| | | #{system,jdbcType=VARCHAR} where an_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification">
|
| | | update yeshi_ec_apppage_notification
|
| | |
| | | <if test="beginTime != null">an_begin_time=#{beginTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="endTime != null">an_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">an_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="system != null">an_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where an_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_apppage_notification
|
| | | WHERE 1=1
|
| | | WHERE 1=1 AND an_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (an_type like '%${key}%' or an_content like '%${key}%')
|
| | | </if>
|
| | |
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(an_id),0) FROM yeshi_ec_apppage_notification
|
| | | WHERE 1=1
|
| | | WHERE 1=1 AND an_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (an_type like '%${key}%' or an_content like '%${key}%')
|
| | | </if>
|
| | |
| | | <result column="h_end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="h_createtime" property="createtime" jdbcType="TIMESTAMP"/>
|
| | | <result column="h_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
|
| | | <result column="h_system" property="system" jdbcType="VARCHAR"/>
|
| | | <association property="helpClass" column="h_cid"
|
| | | javaType="com.yeshi.fanli.entity.bus.help.HelpClass">
|
| | | <id column="h_cid" property="id" jdbcType="BIGINT" />
|
| | |
| | | </association>
|
| | | </resultMap>
|
| | |
|
| | | <sql id="Base_Column_List">h_id,h_title,h_weight,h_state,h_cid,h_start_time,h_end_time,h_createtime,h_updatetime</sql>
|
| | | <sql id="Base_Column_List">h_id,h_title,h_weight,h_state,h_cid,h_start_time,h_end_time,h_createtime,h_updatetime,h_system</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_help_center where h_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_help_center where h_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_help_center (h_id,h_title,h_weight,h_state,h_cid,h_start_time,h_end_time,h_createtime,h_updatetime) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{weight,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{helpClass.id,jdbcType=BIGINT},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_help_center
|
| | | <delete id="deleteByPrimaryKey"
|
| | | parameterType="java.lang.Long">delete from yeshi_ec_help_center where h_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_help_center (h_id,h_title,h_weight,h_state,h_cid,h_start_time,h_end_time,h_createtime,h_updatetime,h_system) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{weight,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{helpClass.id,jdbcType=BIGINT},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP},#{system,jdbcType=VARCHAR})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_help_center
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">h_id,</if>
|
| | | <if test="title != null">h_title,</if>
|
| | |
| | | <if test="endTime != null">h_end_time,</if>
|
| | | <if test="createtime != null">h_createtime,</if>
|
| | | <if test="updatetime != null">h_updatetime,</if>
|
| | | </trim>values
|
| | | <if test="system != null">h_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</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>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter">update yeshi_ec_help_center set h_title = #{title,jdbcType=VARCHAR},h_weight = #{weight,jdbcType=INTEGER},h_state = #{state,jdbcType=INTEGER},h_cid = #{helpClass.id,jdbcType=BIGINT},h_start_time = #{startTime,jdbcType=TIMESTAMP},h_end_time = #{endTime,jdbcType=TIMESTAMP},h_createtime = #{createtime,jdbcType=TIMESTAMP},h_updatetime = #{updatetime,jdbcType=TIMESTAMP} where h_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter">update yeshi_ec_help_center
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter">update yeshi_ec_help_center set h_title = #{title,jdbcType=VARCHAR},h_weight = #{weight,jdbcType=INTEGER},h_state = #{state,jdbcType=INTEGER},h_cid = #{helpClass.id,jdbcType=BIGINT},h_start_time = #{startTime,jdbcType=TIMESTAMP},h_end_time = #{endTime,jdbcType=TIMESTAMP},h_createtime = #{createtime,jdbcType=TIMESTAMP},h_updatetime = #{updatetime,jdbcType=TIMESTAMP},h_system = #{system,jdbcType=VARCHAR} where h_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpCenter">update
|
| | | yeshi_ec_help_center
|
| | | <set>
|
| | | <if test="title != null">h_title=#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="weight != null">h_weight=#{weight,jdbcType=INTEGER},</if>
|
| | |
| | | <if test="endTime != null">h_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="createtime != null">h_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updatetime != null">h_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where h_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">h_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where h_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
|
| | | <select id="query" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_help_center ht
|
| | | LEFT JOIN yeshi_ec_help_class hc ON ht.h_cid = hc.hc_id
|
| | | WHERE <![CDATA[1>0]]>
|
| | | WHERE <![CDATA[1>0]]> AND h_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND ht.h_title like '%${key}%'
|
| | | </if>
|
| | |
| | | <if test='state != null'>
|
| | | AND ht.h_state = #{state}
|
| | | </if>
|
| | |
|
| | | AND h_system=#{system}
|
| | | </select>
|
| | |
|
| | | <select id="listValid" resultMap="BaseResultMap">
|
| | | SELECT h_id, h_title FROM yeshi_ec_help_center
|
| | | WHERE h_id > #{pageId} AND h_state = 1
|
| | | WHERE h_id > #{pageId} AND h_state = 1 AND h_system=#{system}
|
| | | AND IF(h_start_time IS NULL,TRUE, h_start_time<![CDATA[<=]]>NOW())
|
| | | AND IF(h_end_time IS NULL,TRUE, h_end_time >=NOW())
|
| | | <if test='key != null and key != ""'>
|
| | |
| | | <result column="hc_end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="hc_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="hc_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="hc_system" property="system" jdbcType="VARCHAR"/>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">hc_id,hc_name,hc_picture,hc_sort,hc_show_state,hc_start_time,hc_end_time,hc_create_time,hc_update_time</sql>
|
| | | <sql id="Base_Column_List">hc_id,hc_name,hc_picture,hc_sort,hc_show_state,hc_start_time,hc_end_time,hc_create_time,hc_update_time,hc_system</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_help_class where hc_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_help_class where hc_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_help_class (hc_id,hc_name,hc_picture,hc_sort,hc_show_state,hc_start_time,hc_end_time,hc_create_time,hc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{sort,jdbcType=INTEGER},#{showState,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_help_class
|
| | | <delete id="deleteByPrimaryKey"
|
| | | parameterType="java.lang.Long">delete from yeshi_ec_help_class where hc_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_help_class (hc_id,hc_name,hc_picture,hc_sort,hc_show_state,hc_start_time,hc_end_time,hc_create_time,hc_update_time,hc_system) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{sort,jdbcType=INTEGER},#{showState,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{system,jdbcType=VARCHAR})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_help_class
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">hc_id,</if>
|
| | | <if test="name != null">hc_name,</if>
|
| | |
| | | <if test="endTime != null">hc_end_time,</if>
|
| | | <if test="createTime != null">hc_create_time,</if>
|
| | | <if test="updateTime != null">hc_update_time,</if>
|
| | | </trim>values
|
| | | <if test="system != null">hc_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</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>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass">update yeshi_ec_help_class set hc_name = #{name,jdbcType=VARCHAR},hc_picture = #{picture,jdbcType=VARCHAR},hc_sort = #{sort,jdbcType=INTEGER},hc_show_state = #{showState,jdbcType=INTEGER},hc_start_time = #{startTime,jdbcType=TIMESTAMP},hc_end_time = #{endTime,jdbcType=TIMESTAMP},hc_create_time = #{createTime,jdbcType=TIMESTAMP},hc_update_time = #{updateTime,jdbcType=TIMESTAMP} where hc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass">update yeshi_ec_help_class
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.bus.help.HelpClass">update yeshi_ec_help_class set hc_name = #{name,jdbcType=VARCHAR},hc_picture = #{picture,jdbcType=VARCHAR},hc_sort = #{sort,jdbcType=INTEGER},hc_show_state = #{showState,jdbcType=INTEGER},hc_start_time = #{startTime,jdbcType=TIMESTAMP},hc_end_time = #{endTime,jdbcType=TIMESTAMP},hc_create_time = #{createTime,jdbcType=TIMESTAMP},hc_update_time = #{updateTime,jdbcType=TIMESTAMP},hc_system = #{system,jdbcType=VARCHAR} where hc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.HelpClass">update
|
| | | yeshi_ec_help_class
|
| | | <set>
|
| | | <if test="name != null">hc_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">hc_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="endTime != null">hc_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="createTime != null">hc_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">hc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where hc_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">hc_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where hc_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
|
| | | <delete id="deleteByPrimaryKeyBatch" parameterType="java.util.List">
|
| | | delete from yeshi_ec_help_class WHERE hc_id in
|
| | | <foreach collection="list" item="item" open="(" close=")"
|
| | | separator=",">#{item}</foreach>
|
| | | separator=",">#{item}
|
| | | </foreach>
|
| | | </delete>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_help_class
|
| | | WHERE 1=1
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_help_class
|
| | | WHERE 1=1 AND hc_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (hc_name like '%${key}%')
|
| | | </if>
|
| | |
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(hc_id),0) FROM yeshi_ec_help_class
|
| | | WHERE 1=1
|
| | | WHERE 1=1 AND hc_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (hc_name like '%${key}%')
|
| | | </if>
|
| | |
| | | </select>
|
| | |
|
| | | <select id="getChangeOrder" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_help_class
|
| | | WHERE 1=1
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_help_class
|
| | | WHERE 1=1 AND hc_system=#{system}
|
| | | <if test="type == -1">
|
| | | <![CDATA[and hc_sort < #{sort}]]>
|
| | | order by hc_sort desc
|
| | |
| | |
|
| | | <select id="getClassByState" resultMap="BaseResultMap">
|
| | | SELECT hc_id,hc_name,hc_picture FROM yeshi_ec_help_class
|
| | | WHERE hc_show_state = #{state} |
| | | WHERE hc_show_state = #{state} AND hc_system=#{system}
|
| | | AND IF(hc_start_time IS NULL,TRUE, hc_start_time<![CDATA[<=]]>NOW())
|
| | | AND IF(hc_end_time IS NULL,TRUE, hc_end_time >=NOW())
|
| | | ORDER BY hc_sort
|
| | | </select>
|
| | |
|
| | | <select id="getProvidedClass" resultMap="BaseResultMap">
|
| | | SELECT hc_id,hc_name,hc_picture FROM yeshi_ec_help_class
|
| | | SELECT hc_id,hc_name,hc_picture FROM yeshi_ec_help_class where hc_system=#{system}
|
| | | ORDER BY hc_sort
|
| | | </select>
|
| | |
|
| | |
| | | <result column="br_params" property="params" jdbcType="VARCHAR"/>
|
| | | <result column="br_createtime" property="createtime" jdbcType="TIMESTAMP"/>
|
| | | <result column="br_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
|
| | | <result column="br_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.NavbarTypeEnumHandler"/>
|
| | | <result column="br_type" property="type"
|
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.NavbarTypeEnumHandler"/>
|
| | |
|
| | |
|
| | | <result column="sex" property="sex" jdbcType="INTEGER"/>
|
| | |
|
| | | <result column="br_system" property="system" jdbcType="VARCHAR"/>
|
| | |
|
| | | </resultMap>
|
| | |
|
| | |
|
| | | <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_order_man,br_order_woman,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_params,br_createtime,br_updatetime</sql>
|
| | | <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_order_man,br_order_woman,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_params,br_createtime,br_updatetime,br_system</sql>
|
| | |
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT}
|
| | |
| | | SELECT h.*,c.sex AS sex FROM yeshi_ec_home_navbar h
|
| | | LEFT JOIN `yeshi_ec_class` c ON c.`id` = h.`br_class_id`
|
| | | WHERE 1=1
|
| | | AND br_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (h.br_name like '%${key}%')
|
| | | </if>
|
| | |
| | | SELECT IFNULL(count(br_id),0) FROM yeshi_ec_home_navbar h
|
| | | LEFT JOIN `yeshi_ec_class` c ON c.`id` = h.`br_class_id`
|
| | | WHERE 1=1
|
| | | AND br_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (h.br_name like '%${key}%')
|
| | | </if>
|
| | |
| | | <select id="listQueryEffective" resultMap="BaseResultMap">
|
| | | SELECT h.*,c.sex AS sex FROM yeshi_ec_home_navbar h
|
| | | LEFT JOIN `yeshi_ec_class` c ON c.`id` = h.`br_class_id`
|
| | | WHERE h.br_state = 1
|
| | | WHERE h.br_state = 1 AND br_system=#{system}
|
| | | AND IF(h.br_start_time IS NULL,TRUE, h.br_start_time<![CDATA[<=]]> NOW())
|
| | | AND IF(h.br_end_time IS NULL,TRUE, h.br_end_time <![CDATA[>=]]> NOW())
|
| | | ORDER BY h.br_orderby
|
| | |
| | | <select id="listQueryDefaultNavbar" resultMap="BaseResultMap">
|
| | | SELECT h.*,c.sex AS sex FROM yeshi_ec_home_navbar h
|
| | | LEFT JOIN `yeshi_ec_class` c ON c.`id` = h.`br_class_id`
|
| | | WHERE h.br_state = 1 AND br_is_default = 1
|
| | | WHERE br_system=#{system} AND h.br_state = 1 AND br_is_default = 1
|
| | | AND IF(h.br_start_time IS NULL,TRUE, h.br_start_time<![CDATA[<=]]> NOW())
|
| | | AND IF(h.br_end_time IS NULL,TRUE, h.br_end_time <![CDATA[>=]]> NOW())
|
| | | <!-- 通用版 -->
|
| | |
| | |
|
| | | <select id="listQueryFixedNavbar" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_home_navbar
|
| | | WHERE br_state = 1 AND br_is_default = 1 AND br_is_fixed = 1
|
| | | WHERE br_state = 1 AND br_system=#{system} AND br_is_default = 1 AND br_is_fixed = 1
|
| | | AND IF(br_start_time IS NULL,TRUE, br_start_time<![CDATA[<=]]> NOW())
|
| | | AND IF(br_end_time IS NULL,TRUE, br_end_time <![CDATA[>=]]> NOW())
|
| | | ORDER BY br_orderby
|
| | |
| | |
|
| | | <select id="getEffectiveByClassId" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_home_navbar
|
| | | WHERE br_state = 1 AND br_class_id = #{classId}
|
| | | WHERE br_state = 1 AND br_system=#{system} AND br_class_id = #{classId}
|
| | | LIMIT 1
|
| | | </select>
|
| | |
|
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
|
| | | delete from yeshi_ec_home_navbar WHERE br_id in
|
| | | <foreach collection="list" item="item" open="(" close=")"
|
| | | separator=",">#{item}</foreach>
|
| | | separator=",">#{item}
|
| | | </foreach>
|
| | | </delete>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
| | | delete from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | |
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_order_man,br_order_woman,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_params,br_createtime,br_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{orderMan,jdbcType=INTEGER},#{orderWoman,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{isDefault,jdbcType=VARCHAR},#{isFixed,jdbcType=VARCHAR},#{params,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_order_man,br_order_woman,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_params,br_createtime,br_updatetime,br_system) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{orderMan,jdbcType=INTEGER},#{orderWoman,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{isDefault,jdbcType=VARCHAR},#{isFixed,jdbcType=VARCHAR},#{params,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP},#{system,jdbcType=VARCHAR})</insert>
|
| | |
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">br_id,</if>
|
| | | <if test="name != null">br_name,</if>
|
| | |
| | | <if test="params != null">br_params,</if>
|
| | | <if test="createtime != null">br_createtime,</if>
|
| | | <if test="updatetime != null">br_updatetime,</if>
|
| | | </trim>values
|
| | | <if test="system != null">br_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if>
|
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if>
|
| | | </trim>
|
| | | </insert>
|
| | |
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_order_man = #{orderMan,jdbcType=INTEGER},br_order_woman = #{orderWoman,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_is_default = #{isDefault,jdbcType=VARCHAR},br_is_fixed = #{isFixed,jdbcType=VARCHAR},br_params = #{params,jdbcType=VARCHAR},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} where br_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_order_man = #{orderMan,jdbcType=INTEGER},br_order_woman = #{orderWoman,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_is_default = #{isDefault,jdbcType=VARCHAR},br_is_fixed = #{isFixed,jdbcType=VARCHAR},br_params = #{params,jdbcType=VARCHAR},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} ,br_system = #{system,jdbcType=VARCHAR} where br_id = #{id,jdbcType=BIGINT}</update>
|
| | |
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update
|
| | | yeshi_ec_home_navbar
|
| | | <set>
|
| | | <if test="name != null">br_name=#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">br_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="params != null">br_params=#{params,jdbcType=VARCHAR},</if>
|
| | | <if test="createtime != null">br_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updatetime != null">br_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where br_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">br_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where br_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | | <result column="pc_push_time" property="pushTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="pc_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="pc_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="pc_system" property="system" jdbcType="VARCHAR"/>
|
| | | </resultMap>
|
| | | <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>
|
| | | <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,pc_system</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_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
|
| | | <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_versions,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time,pc_system) 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},#{system,jdbcType=VARCHAR})</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="title != null">pc_title,</if>
|
| | |
| | | <if test="pushTime != null">pc_push_time,</if>
|
| | | <if test="createTime != null">pc_create_time,</if>
|
| | | <if test="updateTime != null">pc_update_time,</if>
|
| | | </trim>values
|
| | | <if test="system != null">pc_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="title != null">#{title,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>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</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_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
|
| | | <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},pc_system = #{system,jdbcType=VARCHAR} 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="content != null">pc_content=#{content,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="pushTime != null">pc_push_time=#{pushTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="createTime != null">pc_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">pc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where pc_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">pc_system=#{system,jdbcType=VARCHAR},</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
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_push_coupon
|
| | | WHERE 1=1 AND pc_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND pc_uids like '%${key}%'
|
| | | </if>
|
| | |
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(pc_id),0) FROM yeshi_ec_push_coupon
|
| | | WHERE 1=1
|
| | | WHERE 1=1 AND pc_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND pc_uids like '%${key}%'
|
| | | </if>
|
| | |
| | |
|
| | | <select id="listQueryEffective" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_push_coupon
|
| | | WHERE pc_pushed = 1 |
| | | WHERE pc_pushed = 1 AND pc_system=#{system}
|
| | | AND DATE_FORMAT(CURDATE(),'%Y%m%d') <![CDATA[ <= ]]>DATE_FORMAT(pc_end_time,'%Y%m%d');
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | <result column="pg_type" property="type" jdbcType="INTEGER"/>
|
| | | <result column="pg_other_id" property="otherId" jdbcType="VARCHAR"/>
|
| | | <result column="pg_scan_num" property="scanNum" jdbcType="INTEGER"/>
|
| | | <result column="pg_system" property="system" jdbcType="VARCHAR"/>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num</sql>
|
| | | <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num,pg_system</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_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{isPush,jdbcType=INTEGER},#{controlTime,jdbcType=TIMESTAMP},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{type,jdbcType=INTEGER},#{otherId,jdbcType=VARCHAR},#{scanNum,jdbcType=INTEGER})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods
|
| | | <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_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num,pg_system) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{isPush,jdbcType=INTEGER},#{controlTime,jdbcType=TIMESTAMP},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{type,jdbcType=INTEGER},#{otherId,jdbcType=VARCHAR},#{scanNum,jdbcType=INTEGER},#{system,jdbcType=VARCHAR})</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="alertTitle != null">pg_alert_title,</if>
|
| | |
| | | <if test="type != null">pg_type,</if>
|
| | | <if test="otherId != null">pg_other_id,</if>
|
| | | <if test="scanNum != null">pg_scan_num,</if>
|
| | | </trim>values
|
| | | <if test="system != null">pg_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="alertTitle != null">#{alertTitle,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</if>
|
| | | <if test="otherId != null">#{otherId,jdbcType=VARCHAR},</if>
|
| | | <if test="scanNum != null">#{scanNum,jdbcType=INTEGER},</if>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</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_versions = #{versions,jdbcType=VARCHAR},pg_remark = #{remark,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=INTEGER},pg_control_time = #{controlTime,jdbcType=TIMESTAMP},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP},pg_type = #{type,jdbcType=INTEGER},pg_other_id = #{otherId,jdbcType=VARCHAR},pg_scan_num = #{scanNum,jdbcType=INTEGER} where pg_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods
|
| | | <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_versions = #{versions,jdbcType=VARCHAR},pg_remark = #{remark,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=INTEGER},pg_control_time = #{controlTime,jdbcType=TIMESTAMP},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP},pg_type = #{type,jdbcType=INTEGER},pg_other_id = #{otherId,jdbcType=VARCHAR},pg_scan_num = #{scanNum,jdbcType=INTEGER},pg_system = #{system,jdbcType=VARCHAR} 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="alertContent != null">pg_alert_content=#{alertContent,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="type != null">pg_type=#{type,jdbcType=INTEGER},</if>
|
| | | <if test="otherId != null">pg_other_id=#{otherId,jdbcType=VARCHAR},</if>
|
| | | <if test="scanNum != null">pg_scan_num=#{scanNum,jdbcType=INTEGER},</if>
|
| | | </set> where pg_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">pg_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where pg_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <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>
|
| | | close=")">#{item}
|
| | | </foreach>
|
| | | </delete>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" />,IF(`pg_control_time` IS NOT NULL,pg_control_time,`pg_createtime`) AS orderyTime FROM yeshi_ec_push_goods
|
| | | SELECT<include refid="Base_Column_List"/>,IF(`pg_control_time` IS NOT NULL,pg_control_time,`pg_createtime`) AS
|
| | | orderyTime FROM yeshi_ec_push_goods
|
| | | WHERE 1=1
|
| | | AND pg_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%')
|
| | | </if>
|
| | | <if test='state != null'>
|
| | | AND pg_is_push = #{state}
|
| | | </if>
|
| | |
|
| | |
|
| | |
|
| | | ORDER BY orderyTime DESC
|
| | | LIMIT ${start},${count}
|
| | | </select>
|
| | |
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(pg_id),0) FROM yeshi_ec_push_goods
|
| | | WHERE 1=1
|
| | | AND pg_system=#{system}
|
| | | <if test='key != null and key != ""'>
|
| | | AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%')
|
| | | </if>
|
| | |
| | | </select>
|
| | |
|
| | | <select id="listHistoryByPushTime" resultMap="BaseResultMap">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_push_goods
|
| | | WHERE pg_is_push = 1 AND <![CDATA[pg_push_time >= #{pushTime}]]>
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_push_goods
|
| | | WHERE pg_is_push = 1 AND pg_system=#{system} AND <![CDATA[pg_push_time >= #{pushTime}]]>
|
| | | AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid} </if>)
|
| | | ORDER BY pg_push_time desc
|
| | | LIMIT ${start},${count}
|
| | |
| | |
|
| | | <select id="countHistoryByPushTime" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(pg_id),0) FROM yeshi_ec_push_goods
|
| | | WHERE pg_is_push = 1 AND <![CDATA[pg_push_time >= #{pushTime}]]>
|
| | | WHERE pg_is_push = 1 AND pg_system=#{system} AND <![CDATA[pg_push_time >= #{pushTime}]]>
|
| | | AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid} </if>)
|
| | | </select>
|
| | |
|
| | | <select id="listByPushState" resultMap="BaseResultMap" parameterType="java.util.List">
|
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_push_goods
|
| | | SELECT
|
| | | <include refid="Base_Column_List"/>
|
| | | FROM yeshi_ec_push_goods
|
| | | WHERE pg_is_push = 1 AND pg_id in
|
| | | <foreach item="item" collection="list" open="(" separator=","
|
| | | close=")">#{item}</foreach>
|
| | | close=")">#{item}
|
| | | </foreach>
|
| | | </select>
|
| | |
|
| | | <select id="listTask" resultMap="BaseResultMap">
|
| | | SELECT * FROM `yeshi_ec_push_goods` p
|
| | | WHERE p.`pg_is_push` = 0 AND p.`pg_control_time` IS NOT NULL |
| | | WHERE p.`pg_is_push` = 0 AND pg_system=#{system} AND p.`pg_control_time` IS NOT NULL
|
| | | AND p.`pg_control_time` <![CDATA[<=]]> NOW()
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | <result column="pi_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="pi_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="pi_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.PushTypeEnumHandler" />
|
| | | <result column="pi_system" property="system" jdbcType="VARCHAR"/>
|
| | | </resultMap>
|
| | |
|
| | | <sql id="Base_Column_List">pi_id,pi_title,pi_content,pi_uids,pi_json_data,pi_type,pi_control_time,pi_remark,pi_state,pi_push_time,pi_create_time,pi_update_time</sql>
|
| | | <sql id="Base_Column_List">pi_id,pi_title,pi_content,pi_uids,pi_json_data,pi_type,pi_control_time,pi_remark,pi_state,pi_push_time,pi_create_time,pi_update_time,pi_system</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_push_info where pi_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_info where pi_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_info (pi_id,pi_title,pi_content,pi_uids,pi_json_data,pi_type,pi_control_time,pi_remark,pi_state,pi_push_time,pi_create_time,pi_update_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{uids,jdbcType=VARCHAR},#{jsonData,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{controlTime,jdbcType=TIMESTAMP},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_info
|
| | | <delete id="deleteByPrimaryKey"
|
| | | parameterType="java.lang.Long">delete from yeshi_ec_push_info where pi_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushInfo" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_push_info (pi_id,pi_title,pi_content,pi_uids,pi_json_data,pi_type,pi_control_time,pi_remark,pi_state,pi_push_time,pi_create_time,pi_update_time,pi_system) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{uids,jdbcType=VARCHAR},#{jsonData,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{controlTime,jdbcType=TIMESTAMP},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{system,jdbcType=VARCHAR})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushInfo" useGeneratedKeys="true"
|
| | | keyProperty="id">insert into yeshi_ec_push_info
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">pi_id,</if>
|
| | | <if test="title != null">pi_title,</if>
|
| | |
| | | <if test="pushTime != null">pi_push_time,</if>
|
| | | <if test="createTime != null">pi_create_time,</if>
|
| | | <if test="updateTime != null">pi_update_time,</if>
|
| | | </trim>values
|
| | | <if test="system != null">pi_system,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="title != null">#{title,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>
|
| | | <if test="system != null">#{system,jdbcType=VARCHAR},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushInfo">update yeshi_ec_push_info set pi_title = #{title,jdbcType=VARCHAR},pi_content = #{content,jdbcType=VARCHAR},pi_uids = #{uids,jdbcType=VARCHAR},pi_json_data = #{jsonData,jdbcType=VARCHAR},pi_type = #{type,jdbcType=VARCHAR},pi_control_time = #{controlTime,jdbcType=TIMESTAMP},pi_remark = #{remark,jdbcType=VARCHAR},pi_state = #{state,jdbcType=INTEGER},pi_push_time = #{pushTime,jdbcType=TIMESTAMP},pi_create_time = #{createTime,jdbcType=TIMESTAMP},pi_update_time = #{updateTime,jdbcType=TIMESTAMP} where pi_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushInfo">update yeshi_ec_push_info
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.push.PushInfo">update yeshi_ec_push_info set pi_title = #{title,jdbcType=VARCHAR},pi_content = #{content,jdbcType=VARCHAR},pi_uids = #{uids,jdbcType=VARCHAR},pi_json_data = #{jsonData,jdbcType=VARCHAR},pi_type = #{type,jdbcType=VARCHAR},pi_control_time = #{controlTime,jdbcType=TIMESTAMP},pi_remark = #{remark,jdbcType=VARCHAR},pi_state = #{state,jdbcType=INTEGER},pi_push_time = #{pushTime,jdbcType=TIMESTAMP},pi_create_time = #{createTime,jdbcType=TIMESTAMP},pi_update_time = #{updateTime,jdbcType=TIMESTAMP},pi_system = #{system,jdbcType=VARCHAR} where pi_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushInfo">update
|
| | | yeshi_ec_push_info
|
| | | <set>
|
| | | <if test="title != null">pi_title=#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="content != null">pi_content=#{content,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="pushTime != null">pi_push_time=#{pushTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="createTime != null">pi_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">pi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where pi_id = #{id,jdbcType=BIGINT}
|
| | | <if test="system != null">pi_system=#{system,jdbcType=VARCHAR},</if>
|
| | | </set>
|
| | | where pi_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
|
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
|
| | | delete from yeshi_ec_push_info where pi_push_time is null AND pi_id in
|
| | | <foreach item="item" collection="list" open="(" separator=","
|
| | | close=")">#{item}</foreach>
|
| | | close=")">#{item}
|
| | | </foreach>
|
| | | </delete>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT p.*,IF(`pi_control_time` IS NOT NULL,pi_control_time,`pi_create_time`) AS orderyTime FROM yeshi_ec_push_info p
|
| | | WHERE pi_type = #{type}
|
| | | SELECT p.*,IF(`pi_control_time` IS NOT NULL,pi_control_time,`pi_create_time`) AS orderyTime FROM
|
| | | yeshi_ec_push_info p
|
| | | WHERE pi_type = #{type} AND pi_system=#{system}
|
| | | <if test="key != null and key !='' ">
|
| | | <if test="keyType == 1">AND pi_title like '%#{key}%'</if>
|
| | | <if test="keyType == 2">AND pi_content like '%#{key}%'</if>
|
| | |
| | |
|
| | | <select id="countQuery" resultType="java.lang.Long">
|
| | | SELECT IFNULL(COUNT(pi_id),0) FROM yeshi_ec_push_info
|
| | | WHERE pi_type = #{type}
|
| | | WHERE pi_type = #{type} AND pi_system=#{system}
|
| | | <if test="key != null and key !='' ">
|
| | | <if test="keyType == 1">AND pi_title like '%#{key}%'</if>
|
| | | <if test="keyType == 2">AND pi_content like '%#{key}%'</if>
|
| | |
| | |
|
| | | <select id="listTask" resultMap="BaseResultMap">
|
| | | SELECT * FROM `yeshi_ec_push_info` p
|
| | | WHERE p.`pi_state` = 0 AND p.`pi_control_time` IS NOT NULL |
| | | WHERE p.`pi_state` = 0 AND pi_system=#{system} AND p.`pi_control_time` IS NOT NULL
|
| | | AND p.`pi_control_time` <![CDATA[<=]]> NOW()
|
| | | </select>
|
| | | </mapper>
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.brand.BrandClassSystemMapMapper;
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.brand.BrandClassSystemMap;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | private GoodsClassService goodsClassService;
|
| | |
|
| | | @Resource
|
| | | private BrandClassShopService brandClassShopService;
|
| | | private BrandClassSystemMapMapper brandClassSystemMapMapper;
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<BrandClass> listEffective() {
|
| | | return brandClassMapper.listEffective();
|
| | | public List<BrandClass> listEffective(SystemEnum system) {
|
| | | return brandClassMapper.listEffective(system);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listBrandClassEffectiveCache'")
|
| | | public List<BrandClass> listBrandClassEffectiveCache() {
|
| | | return brandClassMapper.listEffective();
|
| | | @Cacheable(value = "brandCache", key = "'listBrandClassEffectiveCache-'+#system")
|
| | | public List<BrandClass> listBrandClassEffectiveCache(SystemEnum system) {
|
| | | return listEffective(system);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public void saveObject(BrandClass record) throws BrandClassException, Exception{
|
| | | public void saveObject(BrandClass record, List<SystemEnum> systemList) throws BrandClassException, Exception {
|
| | | Long gcid = record.getGcid();
|
| | | if (gcid != null)
|
| | | record.setGoodsClass(new GoodsClass(gcid));
|
| | |
| | | record.setOrderBy(brandClassMapper.getMaxOrder() + 1);
|
| | | record.setCreateTime(new Date());
|
| | | brandClassMapper.insert(record);
|
| | | //添加映射
|
| | | if (systemList != null)
|
| | | for (SystemEnum system : systemList) {
|
| | | BrandClassSystemMap map=new BrandClassSystemMap();
|
| | | map.setBrandClass(record);
|
| | | map.setCreateTime(new Date());
|
| | | map.setSystem(system);
|
| | | brandClassSystemMapMapper.insertSelective(map);
|
| | | }
|
| | | } else {
|
| | | BrandClass resultObj = brandClassMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null)
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | @Override
|
| | | public void updateOrder(Long id, Integer moveType) throws BrandClassException, Exception{
|
| | | public void updateOrder(Long id, Integer moveType, SystemEnum system) throws BrandClassException, Exception {
|
| | | if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1)))
|
| | | throw new BrandClassException(1, "传递的类型不正确");
|
| | |
|
| | |
| | | return brandClassMapper.deleteBatchByPrimaryKey(list);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void deleteSystemMapBatch(List<Long> list, SystemEnum system) {
|
| | | List<BrandClassSystemMap> mapList = brandClassSystemMapMapper.listByClassIdsAndSystem(list, system);
|
| | | if (mapList != null) {
|
| | | for (BrandClassSystemMap map : mapList)
|
| | | brandClassSystemMapMapper.deleteByPrimaryKey(map.getId());
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<BrandClass> listQuery(long start, int count, String key, Integer state) {
|
| | | List<BrandClass> listQuery = brandClassMapper.listQuery(start, count, key, state);
|
| | | public List<BrandClass> listQuery(long start, int count, String key, Integer state, SystemEnum system) {
|
| | | List<BrandClass> listQuery = brandClassMapper.listQuery(start, count, key, state,system);
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | return listQuery;
|
| | | }
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer state) {
|
| | | return brandClassMapper.countQuery(key, state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system) {
|
| | | return brandClassMapper.countQuery(key, state,system);
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(record);
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(record, SystemEnum.blks);
|
| | |
|
| | | BrandInfo update = new BrandInfo();
|
| | | update.setId(record.getId());
|
| | |
| | | if (StringUtil.isNullOrEmpty(name) && StringUtil.isNullOrEmpty(searchKey))
|
| | | continue;
|
| | | // 添加商品
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(brandInfo);
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(brandInfo, SystemEnum.blks);
|
| | |
|
| | | BrandInfo updateInfo = new BrandInfo();
|
| | | updateInfo.setId(brandInfo.getId());
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.common; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.common.CommonConfigMapper; |
| | | import com.yeshi.fanli.entity.config.CommonConfig; |
| | | import com.yeshi.fanli.service.inter.common.CommonConfigService; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | public class CommonConfigServiceImpl implements CommonConfigService { |
| | | |
| | | @Resource |
| | | private CommonConfigMapper commonConfigMapper; |
| | | |
| | | @Override |
| | | public String getValue(String key) { |
| | | CommonConfig config = commonConfigMapper.selectByKey(key); |
| | | if (config == null) |
| | | return null; |
| | | return config.getValue(); |
| | | } |
| | | |
| | | @Cacheable(value = "config", key = "'Common-getValue-'+#key") |
| | | @Override |
| | | public String getValueCache(String key) { |
| | | return getValue(key); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void saveComment(String pid, CommentInfo commentInfo) throws GoodsEvaluateException { |
| | | GoodsEvaluate goodsEvaluate = goodsEvaluateDao.getById(pid); |
| | |
| | | |
| | | @Override |
| | | public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, |
| | | String typeEnum) { |
| | | return goodsEvaluateDao.query(start, count, key, state, dynamicType, typeEnum); |
| | | String typeEnum, SystemEnum system) { |
| | | return goodsEvaluateDao.query(start, count, key, state, dynamicType, typeEnum, system); |
| | | } |
| | | |
| | | @Override |
| | | public long count(String key, Integer state, int dynamicType, String typeEnum) { |
| | | return goodsEvaluateDao.count(key, state, dynamicType, typeEnum); |
| | | public long count(String key, Integer state, int dynamicType, String typeEnum, SystemEnum system) { |
| | | return goodsEvaluateDao.count(key, state, dynamicType, typeEnum, system); |
| | | } |
| | | |
| | | @Override |
| | | public void addRanDomShareCount() { |
| | | public void addRanDomShareCount(SystemEnum system) { |
| | | // 发圈 |
| | | try { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(0, Integer.MAX_VALUE, 1); |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(0, Integer.MAX_VALUE, 1, system); |
| | | if (list != null) { |
| | | for (GoodsEvaluate goodsEvaluate : list) { |
| | | Integer shareNum = goodsEvaluate.getShareNum(); |
| | |
| | | |
| | | // 素材 |
| | | try { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(0, Integer.MAX_VALUE, 2); |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(0, Integer.MAX_VALUE, 2, system); |
| | | if (list != null) { |
| | | for (GoodsEvaluate goodsEvaluate : list) { |
| | | Integer shareNum = goodsEvaluate.getShareNum(); |
| | |
| | | |
| | | @Override |
| | | @Cacheable(value = "dynamicCache", key = "'queryValidEvaluateCache-'+#start") |
| | | public List<GoodsEvaluate> queryValidEvaluateCache(int start, int count) { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(start, count, 1); |
| | | public List<GoodsEvaluate> queryValidEvaluateCache(int start, int count, SystemEnum system) { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(start, count, 1, system); |
| | | |
| | | // 更新商品信息 |
| | | executor.execute(new Runnable() { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public long countValid() { |
| | | return goodsEvaluateDao.countValid(1); |
| | | public long countValid(SystemEnum system) { |
| | | return goodsEvaluateDao.countValid(1, system); |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(value = "dynamicCache", key = "'queryMaterialsCache-'+#start+'-'+#type") |
| | | public List<GoodsEvaluate> queryMaterialsCache(int start, int count, int type) throws Exception { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(start, count, type); |
| | | public List<GoodsEvaluate> queryMaterialsCache(int start, int count, int type, SystemEnum system) throws Exception { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(start, count, type, system); |
| | | if (list == null) { |
| | | list = new ArrayList<>(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public long countValidMaterials(int type) { |
| | | return goodsEvaluateDao.countValid(type); |
| | | public long countValidMaterials(int type, SystemEnum system) { |
| | | return goodsEvaluateDao.countValid(type, system); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int addGoodsEvaluate(TaoBaoGoodsBrief goodsBrief, List<String> imgs, ActivityUser user, String title,SystemEnum system) throws GoodsEvaluateException { |
| | | if (goodsBrief == null || user == null || StringUtil.isNullOrEmpty(title)) { |
| | |
| | | @Override |
| | | public void addGoodsEvaluateByDaTaoKe(SystemEnum system) { |
| | | List<Long> listId = null; |
| | | List<GoodsEvaluate> listExist = goodsEvaluateDao.querySingleExist(); |
| | | List<GoodsEvaluate> listExist = goodsEvaluateDao.querySingleExist(system); |
| | | if (listExist != null && listExist.size() > 0) { |
| | | listId = new ArrayList<Long>(); |
| | | for (GoodsEvaluate goodsEvaluate : listExist) { |
| | |
| | | |
| | | /** |
| | | * 发圈标题 加入表情 |
| | | * |
| | | * @param desc |
| | | * @return |
| | | */ |
| | |
| | | if (goods == null) { |
| | | return; |
| | | } |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_TAOBAO, |
| | | goods.getAuctionId()+""); |
| | | goods.getAuctionId() + "", system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55"); |
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate()); |
| | | GoodsDetailVO goodsNew = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO); |
| | | updateGoods(queryExist, goodsNew); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | if (jdGoods == null) { |
| | | return; |
| | | } |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_JD, jdGoods.getSkuId()+""); |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_JD, jdGoods.getSkuId() + "", system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55"); |
| | |
| | | |
| | | updateGoods(queryExist, goodsNew); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updatePDDGoods(PDDGoodsDetail pddGoods) { |
| | | if (pddGoods == null) { |
| | | return; |
| | | } |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_PDD, pddGoods.getGoodsId()+""); |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_PDD, pddGoods.getGoodsId() + "", system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55"); |
| | |
| | | GoodsDetailVO goodsNew = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO); |
| | | updateGoods(queryExist, goodsNew); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateVIPGoods(VIPGoodsInfo goods) { |
| | | if (goods == null) { |
| | | return; |
| | | } |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_VIP, |
| | | goods.getGoodsId()); |
| | | goods.getGoodsId(), system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55"); |
| | |
| | | GoodsDetailVO goodsNew = GoodsDetailVOFactory.convertVIPGoods(goods, paramsDTO); |
| | | updateGoods(queryExist, goodsNew); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateSuningGoods(SuningGoodsInfo goods) { |
| | | if (goods == null) { |
| | | return; |
| | | } |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_SUNING, |
| | | goods.getCommodityInfo().getCommodityCode()); |
| | | goods.getCommodityInfo().getCommodityCode(), system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55"); |
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate()); |
| | | GoodsDetailVO goodsNew = GoodsDetailVOFactory.convertSuningGoods(goods, paramsDTO); |
| | | updateGoods(queryExist, goodsNew); |
| | | } |
| | | } |
| | | |
| | | private void updateGoods(List<GoodsEvaluate> listExist, GoodsDetailVO goodsNew) { |
| | |
| | | if (goodsId == null) { |
| | | return; |
| | | } |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_TAOBAO,goodsId); |
| | | if (list == null || list.size() == 0) { |
| | | return; |
| | | } |
| | | |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_TAOBAO, goodsId, system); |
| | | if (list == null || list.size() == 0) { |
| | | continue; |
| | | } |
| | | // 下架商品 |
| | | offlineGoods(list, Constant.SOURCE_TYPE_TAOBAO, goodsId); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public GoodsEvaluate queryExistSingle(String goodsId, int goodsType) { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryExistSingle(goodsType, goodsId); |
| | | public GoodsEvaluate queryExistSingle(String goodsId, int goodsType,SystemEnum system) { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryExistSingle(goodsType, goodsId,system); |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | return null; |
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | private AdActivityVersionControlService adActivityVersionControlService;
|
| | |
|
| | | @Override
|
| | | public AppPageNotification getAppPageNotificationByType(String type) {
|
| | | public AppPageNotification getAppPageNotificationByType(String type, SystemEnum system) {
|
| | |
|
| | | return appPageNotificationMapper.selectByType(type);
|
| | | return appPageNotificationMapper.selectByType(type,system);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "configCache", key = "'getValidNotificationByTypeCache-'+#type+'-'+ #platform+'-'+#versionCode")
|
| | | @Cacheable(value = "configCache", key = "'getValidNotificationByTypeCache-'+#type+'-'+ #platform+'-'+#versionCode+'-'+#system")
|
| | | @Override
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode) {
|
| | | List<AppPageNotification> recordList = appPageNotificationMapper.listValidByType(type);
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode, SystemEnum system) {
|
| | | List<AppPageNotification> recordList = appPageNotificationMapper.listValidByType(type,system);
|
| | | if (recordList == null || recordList.size() == 0)
|
| | | return null;
|
| | |
|
| | | // 过滤版本
|
| | | AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode);
|
| | | AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode,system);
|
| | | if (app == null) {
|
| | | return null;
|
| | | }
|
| | |
| | | return;
|
| | | if (apn.getType() == null)
|
| | | throw new Exception("类型为空");
|
| | | AppPageNotification old = getAppPageNotificationByType(apn.getType().name());
|
| | | AppPageNotification old = getAppPageNotificationByType(apn.getType().name(),apn.getSystem());
|
| | |
|
| | | if (old != null)
|
| | | throw new Exception("已存在改类型");
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<AppPageNotification> listQuery(long start, int count, String key, Integer show, Integer canClose) {
|
| | | return appPageNotificationMapper.listQuery(start, count, key, show, canClose);
|
| | | public List<AppPageNotification> listQuery(long start, int count, String key, Integer show, Integer canClose, SystemEnum system) {
|
| | | return appPageNotificationMapper.listQuery(start, count, key, show, canClose,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer show, Integer canClose) {
|
| | | return appPageNotificationMapper.countQuery(key, show, canClose);
|
| | | public long countQuery(String key, Integer show, Integer canClose, SystemEnum system) {
|
| | | return appPageNotificationMapper.countQuery(key, show, canClose,system);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HelpCenter> query(int pageIndex, int pageSize, String key, Long cid, Integer orderMode, Integer state) {
|
| | | return helpCenterMapper.query(pageIndex, pageSize, key, cid, orderMode, state);
|
| | | public List<HelpCenter> query(int pageIndex, int pageSize, String key, Long cid, Integer orderMode, Integer state, SystemEnum system) {
|
| | | return helpCenterMapper.query(pageIndex, pageSize, key, cid, orderMode, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Long cid, Integer state) {
|
| | | return helpCenterMapper.countQuery(key, cid, state);
|
| | | public long countQuery(String key, Long cid, Integer state, SystemEnum system) {
|
| | | return helpCenterMapper.countQuery(key, cid, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "helpCenterCache", key = "'queryIdAndTitle-'+#pageId+'-'+#key+'-'+#cid")
|
| | | public List<HelpCenter> listValid(long pageId, int pageSize, String key, Long cid) {
|
| | | return helpCenterMapper.listValid(pageId, pageSize, key, cid);
|
| | | @Cacheable(value = "helpCenterCache", key = "'queryIdAndTitle-'+#pageId+'-'+#key+'-'+#cid+'-'+#system")
|
| | | public List<HelpCenter> listValid(long pageId, int pageSize, String key, Long cid, SystemEnum system) {
|
| | | return helpCenterMapper.listValid(pageId, pageSize, key, cid,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void updateSort(Integer moveType, Long id) throws HelpClassException {
|
| | | public void updateSort(Integer moveType, Long id, SystemEnum system) throws HelpClassException {
|
| | |
|
| | | if (id == null || moveType == null) {
|
| | | throw new HelpClassException(1, "传递参数不能为空");
|
| | |
| | | throw new HelpClassException(1, "更新数据已不存在");
|
| | | }
|
| | |
|
| | | HelpClass changeObjct = helpClassMapper.getChangeOrder(moveType, helpClass.getSort());
|
| | | HelpClass changeObjct = helpClassMapper.getChangeOrder(moveType, helpClass.getSort(),system);
|
| | |
|
| | | if (changeObjct == null) {
|
| | | throw new HelpClassException(1, "已经是最边缘位置");
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<HelpClass> query(int start, int count, String key, Integer state)
|
| | | public List<HelpClass> query(int start, int count, String key, Integer state, SystemEnum system)
|
| | | throws HelpClassException {
|
| | | return helpClassMapper.listQuery(start, count, key, state);
|
| | | return helpClassMapper.listQuery(start, count, key, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer state) {
|
| | | return helpClassMapper.countQuery(key, state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system) {
|
| | | return helpClassMapper.countQuery(key, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HelpClass> getClassByState(Integer state) throws HelpClassException {
|
| | | return helpClassMapper.getClassByState(state);
|
| | | public List<HelpClass> getClassByState(Integer state, SystemEnum system) throws HelpClassException {
|
| | | return helpClassMapper.getClassByState(state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HelpClass> getProvidedClass() throws HelpClassException {
|
| | | return helpClassMapper.getProvidedClass();
|
| | | public List<HelpClass> getProvidedClass(SystemEnum system) throws HelpClassException {
|
| | | return helpClassMapper.getProvidedClass(system);
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | |
|
| | | /**
|
| | | * 删除图片-不更新数据库
|
| | | * @param record
|
| | | * @param picture
|
| | | * @throws Exception
|
| | | */
|
| | | public void removePicture(String picture) throws Exception {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<HomeNavbar> listQuery(long start, int count, String key, Integer sex) {
|
| | | public List<HomeNavbar> listQuery(long start, int count, String key, Integer sex, SystemEnum system) {
|
| | |
|
| | | List<HomeNavbar> listObj = homeNavbarMapper.listQuery(start, count, key, sex);
|
| | | List<HomeNavbar> listObj = homeNavbarMapper.listQuery(start, count, key, sex,system);
|
| | | if (listObj == null || listObj.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public long countlistQuery(String key, Integer sex) {
|
| | | return homeNavbarMapper.countListQuery(key, sex);
|
| | | public long countlistQuery(String key, Integer sex, SystemEnum system) {
|
| | | return homeNavbarMapper.countListQuery(key, sex,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "configCache", key = "'listQueryEffectiveNavbar'")
|
| | | public List<HomeNavbar> listQueryEffectiveNavbar() {
|
| | | return homeNavbarMapper.listQueryEffective();
|
| | | public List<HomeNavbar> listQueryEffectiveNavbar(SystemEnum system) {
|
| | | return homeNavbarMapper.listQueryEffective(system);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "configCache", key = "'listQueryDefaultNavbar-'+#sex")
|
| | | public List<HomeNavbar> listQueryDefaultNavbar(Integer sex) {
|
| | | return homeNavbarMapper.listQueryDefaultNavbar(sex);
|
| | | public List<HomeNavbar> listQueryDefaultNavbar(Integer sex, SystemEnum system) {
|
| | | return homeNavbarMapper.listQueryDefaultNavbar(sex,system);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "configCache", key = "'listQueryFixedNavbar'")
|
| | | public List<HomeNavbar> listQueryFixedNavbar() {
|
| | | return homeNavbarMapper.listQueryFixedNavbar();
|
| | | public List<HomeNavbar> listQueryFixedNavbar(SystemEnum system) {
|
| | | return homeNavbarMapper.listQueryFixedNavbar(system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public HomeNavbar getEffectiveByClassId(Long classId) {
|
| | | return homeNavbarMapper.getEffectiveByClassId(classId);
|
| | | public HomeNavbar getEffectiveByClassId(Long classId, SystemEnum system) {
|
| | | return homeNavbarMapper.getEffectiveByClassId(classId,system);
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarUserMapper;
|
| | |
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<HomeNavbar> listEffectiveNavbar(Long uid, String device, Integer sex) {
|
| | | List<HomeNavbar> list = new ArrayList<HomeNavbar>();
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | if (sex == null || sex == 0) {
|
| | | if (uid != null || !StringUtil.isNullOrEmpty(device)) {
|
| | |
| | |
|
| | | if (listUserNavbar != null && listUserNavbar.size() > 0) {
|
| | | // 固定导航
|
| | | List<HomeNavbar> listFixed = homeNavbarService.listQueryFixedNavbar();
|
| | | List<HomeNavbar> listFixed = homeNavbarService.listQueryFixedNavbar(system);
|
| | | if (listFixed != null && listFixed.size() > 0) {
|
| | | list.addAll(listFixed);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | if (list.size() == 0) {
|
| | | List<HomeNavbar> listDefault = homeNavbarService.listQueryDefaultNavbar(sex);
|
| | | List<HomeNavbar> listDefault = homeNavbarService.listQueryDefaultNavbar(sex, system);
|
| | | if (listDefault != null) {
|
| | | list.addAll(listDefault);
|
| | | }
|
| | | }
|
| | | } else {
|
| | | List<HomeNavbar> listDefault = homeNavbarService.listQueryDefaultNavbar(sex);
|
| | | List<HomeNavbar> listDefault = homeNavbarService.listQueryDefaultNavbar(sex, system);
|
| | | if (listDefault != null) {
|
| | | list.addAll(listDefault);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HomeNavbar> restoreSystemDefault(Long uid, String device) throws HomeNavbarUserException {
|
| | | public List<HomeNavbar> restoreSystemDefault(Long uid, String device,SystemEnum system) throws HomeNavbarUserException {
|
| | | if (uid == null && StringUtil.isNullOrEmpty(device)) {
|
| | | throw new HomeNavbarUserException(1, "参数不正确");
|
| | | }
|
| | |
| | | homeNavbarUserMapper.deleteByDevice(device);
|
| | | }
|
| | | // 返回有效的
|
| | | return homeNavbarService.listQueryEffectiveNavbar();
|
| | | return homeNavbarService.listQueryEffectiveNavbar(system);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<SuperHomeNavbar> listBySystem(Long systemId) {
|
| | | return superHomeNavbarMapper.listBySystem(systemId);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "configCache", key = "'listBySystemCache-'+#systemId")
|
| | | @Override
|
| | | public List<SuperHomeNavbar> listBySystemCache(Long systemId) {
|
| | | return listBySystem(systemId);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<SuperHomeNavbar> listByNavbarIds(List<Long> list) {
|
| | | return superHomeNavbarMapper.listByNavbarIds(list);
|
| | | }
|
| | | |
| | | @Override
|
| | | public void deleteBatchByNavbarIds(List<Long> list) {
|
| | | superHomeNavbarMapper.deleteBatchByNavbarIds(list);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<SuperHomeNavbar> querybyNavbarId(Long navbarId, Long systemId) {
|
| | | return superHomeNavbarMapper.querybyNavbarId(navbarId, systemId);
|
| | | }
|
| | | |
| | | @Override
|
| | | public int deletebyNavbarId(Long navbarId, Long systemId) {
|
| | | return superHomeNavbarMapper.deletebyNavbarId(navbarId, systemId);
|
| | | }
|
| | | |
| | | |
| | | |
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | |
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Override
|
| | | public void extractApplay(Extract extract) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(extract.getUserInfo().getId());
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyExtractSuccess(new Date(extract.getExtractTime()),
|
| | | extract.getMoney(), extract.getAccount());
|
| | | try {
|
| | | pushService.pushZNX(extract.getUserInfo().getId(), dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(extract.getUserInfo().getId(), dto.getTitle(), dto.getContent(), null, null,system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyFanliRecieved(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null,system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyFanliRecieved(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null,system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyShareRecieved(orderType, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null,system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | // 推送消息
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyTeamDividents(money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null,system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | @Resource
|
| | | private PushService pushService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | |
|
| | | @Override
|
| | | public void orderFanLiStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | |
| | | // 保存消息明细消息
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_REBATE, goodsCount, payMoney, money, downTime, null, needNotify);
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | if (needNotify) {
|
| | | PushContentDTO dto = PushMsgFactory.createFanLiOrderStatisticed(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null, system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | // 保存消息明细消息
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_SHAER, goodsCount, payMoney, money, downTime, null, needNotify);
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createShareOrderStatisticed(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null, system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | // 保存消息明细消息
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_INVITE, goodsCount, payMoney, totalMoney, downTime, null, true);
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null, system);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | |
| | |
|
| | | /**
|
| | | * 创建订单被统计消息
|
| | | *
|
| | | * @param uid
|
| | | * @param orderId 订单号
|
| | | * @param source 订单来源:淘宝、京东、天猫
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | |
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList) {
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList, SystemEnum system) {
|
| | | List<Integer> versionList = new ArrayList<>();
|
| | | if (versionCodeList == null) {// 全推
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 46);
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 46,system);
|
| | | if (appInfoList != null)
|
| | | for (AppVersionInfo version : appInfoList) {
|
| | | versionList.add(version.getVersionCode());
|
| | |
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushGoods(Long uid, Long auctionId, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.goodsdetail, uid, title, content, null, null, auctionId, versionCodeList);
|
| | | push(PushTypeEnum.goodsdetail, uid, null, null, auctionId, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUrl(Long uid, String url, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.url, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.url, uid, null, url, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushZNX(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, title, content, null, null, null, versionCodeList);
|
| | | public void pushZNX(Long uid, PushBaseContent baseContent) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | public void pushWEEX(Long uid, String weexUrl, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.weex, uid, title, content, weexUrl, null, null, versionCodeList);
|
| | | push(PushTypeEnum.weex, uid, weexUrl, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | public void pushBaiChuanUrl(Long uid, String url, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | |
|
| | | push(PushTypeEnum.baichuan, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.baichuan, uid, null, url, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushWelfareCenter(Long uid, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.welfare, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.welfare, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUserSignInNotification(Long uid, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.signin, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.signin, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | private List<DeviceTokenHW> filterDeviceToken(List<DeviceTokenHW> hwDeviceList, int hour) {
|
| | |
| | | *
|
| | | * @param type
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @param webUrl
|
| | | * @param versionCodeList
|
| | | */
|
| | | private void push(PushTypeEnum type, Long uid, String title, String content, String url, String webUrl,
|
| | | Long goodsId, List<Integer> versionCodeList) throws PushException {
|
| | | private void push(PushTypeEnum type, Long uid, String url, String webUrl,
|
| | | Long goodsId, PushBaseContent content) throws PushException {
|
| | | int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
|
| | | List<Integer> newVersionList = getVersionCodeList(versionCodeList);
|
| | | List<Integer> newVersionList = getVersionCodeList(content.getVersionCodeList(),content.getSystem());
|
| | | // 1.6.5后开始推送
|
| | | for (int i = 0; i < newVersionList.size(); i++) {
|
| | | if (newVersionList.get(i) < 47)
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | HWPushUtil.pushGoods(tokenList, content.getTitle(), content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | HWPushUtil.pushUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | HWPushUtil.pushZNX(tokenList, title, content);
|
| | | HWPushUtil.pushZNX(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | HWPushUtil.pushWEEX(tokenList, content.getTitle(), content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | HWPushUtil.pushBaiChuanUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | HWPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | HWPushUtil.pushWelfareCenter(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | HWPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | HWPushUtil.pushUserSignInNotification(tokenList, content.getTitle(), content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | HWPushUtil.pushGoods(tokenList, content.getTitle(), content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | HWPushUtil.pushUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | HWPushUtil.pushZNX(tokenList, title, content);
|
| | | HWPushUtil.pushZNX(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | HWPushUtil.pushWEEX(tokenList, content.getTitle(), content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | HWPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | HWPushUtil.pushBaiChuanUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | HWPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | HWPushUtil.pushWelfareCenter(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | HWPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | HWPushUtil.pushUserSignInNotification(tokenList, content.getTitle(), content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | |
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList) {
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList,SystemEnum system) {
|
| | | List<Integer> versionList = new ArrayList<>();
|
| | | if (versionCodeList == null) {// 全推
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 51);
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 51,system);
|
| | | if (appInfoList != null)
|
| | | for (AppVersionInfo version : appInfoList) {
|
| | | versionList.add(version.getVersionCode());
|
| | |
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushGoods(Long uid, Long auctionId, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.goodsdetail, uid, title, content, null, null, auctionId, versionCodeList);
|
| | | push(PushTypeEnum.goodsdetail, uid, null, null, auctionId, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUrl(Long uid, String url, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.url, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.url, uid, null, url, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushZNX(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, title, content, null, null, null, versionCodeList);
|
| | | public void pushZNX(Long uid, PushBaseContent baseContent) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | public void pushWEEX(Long uid,String weexUrl, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.weex, uid, title, content, weexUrl, null, null, versionCodeList);
|
| | | push(PushTypeEnum.weex, uid, weexUrl, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | public void pushBaiChuanUrl(Long uid,String url, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | |
|
| | | push(PushTypeEnum.baichuan, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.baichuan, uid, null, url, null, baseContent);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushWelfareCenter(Long uid, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.welfare, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.welfare, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUserSignInNotification(Long uid, PushBaseContent baseContent)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.signin, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.signin, uid, null, null, null, baseContent);
|
| | | }
|
| | |
|
| | | private List<DeviceTokenOPPO> filterDeviceToken(List<DeviceTokenOPPO> deviceList, int hour) {
|
| | |
| | | *
|
| | | * @param type
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @param webUrl
|
| | | * @param versionCodeList
|
| | | */
|
| | | private void push(PushTypeEnum type, Long uid, String title, String content, String url, String webUrl,
|
| | | Long goodsId, List<Integer> versionCodeList) throws PushException {
|
| | | private void push(PushTypeEnum type, Long uid, String url, String webUrl,
|
| | | Long goodsId,PushBaseContent content) throws PushException {
|
| | | int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
|
| | | List<Integer> newVersionList = getVersionCodeList(versionCodeList);
|
| | | List<Integer> newVersionList = getVersionCodeList(content.getVersionCodeList(),content.getSystem());
|
| | | // 1.6.5后开始推送
|
| | | for (int i = 0; i < newVersionList.size(); i++) {
|
| | | if (newVersionList.get(i) < 47)
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | OPPOPushUtil.pushGoods(tokenList, content.getTitle(), content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | OPPOPushUtil.pushUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | OPPOPushUtil.pushZNX(tokenList, title, content);
|
| | | OPPOPushUtil.pushZNX(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | OPPOPushUtil.pushWEEX(tokenList,content.getTitle(), content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | OPPOPushUtil.pushBaiChuanUrl(tokenList,content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | OPPOPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | OPPOPushUtil.pushWelfareCenter(tokenList,content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | OPPOPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | OPPOPushUtil.pushUserSignInNotification(tokenList, content.getTitle(), content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | OPPOPushUtil.pushGoods(tokenList, content.getTitle(), content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | OPPOPushUtil.pushUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | OPPOPushUtil.pushZNX(tokenList, title, content);
|
| | | OPPOPushUtil.pushZNX(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | OPPOPushUtil.pushWEEX(tokenList, content.getTitle(), content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | OPPOPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | OPPOPushUtil.pushBaiChuanUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | OPPOPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | OPPOPushUtil.pushWelfareCenter(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | OPPOPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | OPPOPushUtil.pushUserSignInNotification(tokenList, content.getTitle(), content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.oppoError(e);
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | private PushService pushService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private PushCouponMapper pushCouponMapper;
|
| | |
|
| | | @Resource
|
| | | private PushCouponRecordService pushCouponRecordService;
|
| | | |
| | | @Resource
|
| | | private UserSystemCouponService userSystemCouponService;
|
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<PushCoupon> listQuery(long start, int count, String key, Integer state) {
|
| | | return pushCouponMapper.listQuery(start, count, key, state);
|
| | | public List<PushCoupon> listQuery(long start, int count, String key, Integer state, SystemEnum system) {
|
| | | return pushCouponMapper.listQuery(start, count, key, state, system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer state) {
|
| | | return pushCouponMapper.countQuery(key, state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system) {
|
| | | return pushCouponMapper.countQuery(key, state, system);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | if (listuid == null) {
|
| | | // 全推
|
| | | pushService.pushWelfareCenter(null, title, content, listIOS, listAndroid);
|
| | | pushService.pushWelfareCenter(null, title, content, listIOS, listAndroid, pushCoupon.getSystem());
|
| | |
|
| | | } else {
|
| | | // 指定用户推送
|
| | | for (String str_uid: listuid) {
|
| | | if (str_uid != null && str_uid.trim().length() > 0) {
|
| | | pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listIOS, listAndroid);
|
| | | pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listIOS, listAndroid, pushCoupon.getSystem());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushCoupon> listQueryEffective() {
|
| | | return pushCouponMapper.listQueryEffective();
|
| | | public List<PushCoupon> listQueryEffective(SystemEnum system) {
|
| | | return pushCouponMapper.listQueryEffective(system);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushGoods> listQuery(long start, int count, String key, Integer state) {
|
| | | return pushGoodsMapper.listQuery(start, count, key, state);
|
| | | public List<PushGoods> listQuery(long start, int count, String key, Integer state, SystemEnum system) {
|
| | | return pushGoodsMapper.listQuery(start, count, key, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer state) {
|
| | | return pushGoodsMapper.countQuery(key, state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system) {
|
| | | return pushGoodsMapper.countQuery(key, state,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushGoods> listHistoryByPushTime(long start, int count, Long uid, Date pushTime) {
|
| | | return pushGoodsMapper.listHistoryByPushTime(start, count, uid, pushTime);
|
| | | public List<PushGoods> listHistoryByPushTime(long start, int count, Long uid, Date pushTime, SystemEnum system) {
|
| | | return pushGoodsMapper.listHistoryByPushTime(start, count, uid, pushTime,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countHistoryByPushTime(Long uid, Date pushTime) {
|
| | | return pushGoodsMapper.countHistoryByPushTime(uid, pushTime);
|
| | | public long countHistoryByPushTime(Long uid, Date pushTime, SystemEnum system) {
|
| | | return pushGoodsMapper.countHistoryByPushTime(uid, pushTime,system);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<PushGoods> listTask() {
|
| | | return pushGoodsMapper.listTask();
|
| | | public List<PushGoods> listTask( SystemEnum system) {
|
| | | return pushGoodsMapper.listTask(system);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | String url = configService.get(ConfigKeyEnum.pushActivityLink.getKey());
|
| | | String url = configService.getValue(ConfigKeyEnum.pushActivityLink.getKey(),pushGoods.getSystem());
|
| | | if (StringUtil.isNullOrEmpty(url)) {
|
| | | throw new PushGoodsException(1, "推送页面链接不存在");
|
| | | }
|
| | | url = url + "?id=" + pushGoods.getId();
|
| | | // h活动全推
|
| | | pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid);
|
| | | pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid,pushGoods.getSystem());
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | Long goodsId = commonGoods.getGoodsId();
|
| | | String url = "https://item.taobao.com/item.htm?id=" + goodsId;
|
| | | pushService.pushGoods(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url,listIOS, listAndroid);
|
| | | pushService.pushGoods(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url,listIOS, listAndroid,pushGoods.getSystem());
|
| | | } else {
|
| | | /* 多个商品推送 */
|
| | | String url = configService.get(ConfigKeyEnum.pushGoodsDetails.getKey());
|
| | | String url = configService.getValue(ConfigKeyEnum.pushGoodsDetails.getKey(),pushGoods.getSystem());
|
| | | if (StringUtil.isNullOrEmpty(url)) {
|
| | | throw new PushGoodsException(1, "推送页面链接不存在");
|
| | | }
|
| | | // 生成链接
|
| | | url = url + "?id=" + id;
|
| | | pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid);
|
| | | pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid,pushGoods.getSystem());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private UserSystemMsgService userSystemMsgService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private PushInfoMapper pushInfoMapper;
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 转换json
|
| | | * |
| | | * @param pushGoods
|
| | | */
|
| | | public void convertJson(PushInfo record) {
|
| | | JSONObject json = new JSONObject();
|
| | |
| | |
|
| | | /**
|
| | | * 转换list
|
| | | * |
| | | * @param pushGoods
|
| | | */
|
| | | public String convertVersion(String array) {
|
| | | String versions = "";
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushInfo> listQuery(long start, int count, String key, Integer keyType, Integer state, String type) {
|
| | | public List<PushInfo> listQuery(long start, int count, String key, Integer keyType, Integer state, String type, SystemEnum system) {
|
| | |
|
| | | List<PushInfo> list = pushInfoMapper.listQuery(start, count, key, keyType, state, type);
|
| | | List<PushInfo> list = pushInfoMapper.listQuery(start, count, key, keyType, state, type, system);
|
| | | if (list == null || list.size() == 0) {
|
| | | return list;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer keyType, Integer state, String type) {
|
| | | return pushInfoMapper.countQuery(key, keyType, state, type);
|
| | | public long countQuery(String key, Integer keyType, Integer state, String type, SystemEnum system) {
|
| | | return pushInfoMapper.countQuery(key, keyType, state, type, system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushInfo> listTask() {
|
| | | return pushInfoMapper.listTask();
|
| | | public List<PushInfo> listTask(SystemEnum system) {
|
| | | return pushInfoMapper.listTask(system);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | record.setUpdateTime(new Date());
|
| | | pushInfoMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | @Override
|
| | |
| | | if (listuid == null) { // 全推
|
| | | switch (pushWay) {
|
| | | case 1: // 站内信
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(null, title, content, listIOS, listAndroid, record.getSystem());
|
| | | break;
|
| | | case 2: // 网页推送
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(null, title, content, url, listIOS, listAndroid, record.getSystem());
|
| | | break;
|
| | | case 3: // 百川
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(null, title, content, url, listIOS, listAndroid, record.getSystem());
|
| | | break;
|
| | | default:
|
| | | throw new PushInfoException(1, "推送类型不匹配");
|
| | |
| | | long uid = Long.parseLong(str_uid);
|
| | | switch (pushWay) {
|
| | | case 1: // 站内信
|
| | | pushService.pushZNX(uid, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(uid, title, content, listIOS, listAndroid, record.getSystem());
|
| | | userSystemMsgService.addUserSystemMsg(uid, UserSystemMsgTypeEnum.question, title, content,
|
| | | UserSystemMsg.TIME_TAG_COMMON, null);
|
| | | break;
|
| | | case 2: // 网页推送
|
| | | pushService.pushUrl(uid, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushUrl(uid, title, content, url, listIOS, listAndroid, record.getSystem());
|
| | | break;
|
| | | case 3: // 百川
|
| | | pushService.pushBaiChuanUrl(uid, title, content, url, listIOS, listAndroid);
|
| | | pushService.pushBaiChuanUrl(uid, title, content, url, listIOS, listAndroid, record.getSystem());
|
| | | break;
|
| | | default:
|
| | | throw new PushInfoException(1, "推送类型不匹配");
|
| | |
| | | package com.yeshi.fanli.service.impl.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.AccountMessageMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.push.PushRecordMapper;
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.dto.push.PushTypeEnum;
|
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.AccountMessage;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.system.SystemZnx;
|
| | | import com.yeshi.fanli.entity.xinge.PushRecord;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceTokenHWService;
|
| | | import com.yeshi.fanli.service.inter.push.HWPushService;
|
| | | import com.yeshi.fanli.service.inter.push.IOSPushService;
|
| | | import com.yeshi.fanli.service.inter.push.OPPOPushService;
|
| | | import com.yeshi.fanli.service.inter.push.PushRecordService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.service.inter.push.VIVOPushService;
|
| | | import com.yeshi.fanli.service.inter.push.XMPushService;
|
| | | import com.yeshi.fanli.service.inter.push.*;
|
| | | import com.yeshi.fanli.service.inter.user.SystemZnxService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import java.util.List;
|
| | |
|
| | | @Service
|
| | | public class PushServiceImpl implements PushService {
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushGoods(uid, Long.parseLong(gid), title, content, versionCodeList);
|
| | | hwPushService.pushGoods(uid, Long.parseLong(gid), new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushGoods(uid, Long.parseLong(gid), title, content, versionCodeList);
|
| | | oPPOPushService.pushGoods(uid, Long.parseLong(gid), new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | | // VIVO推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushGoods(uid, Long.parseLong(gid), title, content, versionCodeList);
|
| | | vIVOPushService.pushGoods(uid, Long.parseLong(gid), new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushUrl(uid, url, title, content, versionCodeList);
|
| | | hwPushService.pushUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushUrl(uid, url, title, content, versionCodeList);
|
| | | oPPOPushService.pushUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushUrl(uid, url, title, content, versionCodeList);
|
| | | vIVOPushService.pushUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushZNX(uId, title, content, versionCodeList);
|
| | | hwPushService.pushZNX(uId, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushZNX(uId, title, content, versionCodeList);
|
| | | oPPOPushService.pushZNX(uId, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushZNX(uId, title, content, versionCodeList);
|
| | | vIVOPushService.pushZNX(uId, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushWEEX(uid, title, content, weexUrl, versionCodeList);
|
| | | hwPushService.pushWEEX(uid, weexUrl, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushWEEX(uid, title, content, weexUrl, versionCodeList);
|
| | | oPPOPushService.pushWEEX(uid, weexUrl, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushWEEX(uid, title, content, weexUrl, versionCodeList);
|
| | | vIVOPushService.pushWEEX(uid, weexUrl, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushBaiChuanUrl(uid, title, content, url, versionCodeList);
|
| | | hwPushService.pushBaiChuanUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushBaiChuanUrl(uid, title, content, url, versionCodeList);
|
| | | oPPOPushService.pushBaiChuanUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushBaiChuanUrl(uid, title, content, url, versionCodeList);
|
| | | vIVOPushService.pushBaiChuanUrl(uid, url, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushWelfareCenter(uid, title, content, versionCodeList);
|
| | | hwPushService.pushWelfareCenter(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushWelfareCenter(uid, title, content, versionCodeList);
|
| | | oPPOPushService.pushWelfareCenter(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushWelfareCenter(uid, title, content, versionCodeList);
|
| | | vIVOPushService.pushWelfareCenter(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | hwPushService.pushUserSignInNotification(uid, title, content, versionCodeList);
|
| | | hwPushService.pushUserSignInNotification(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // OPPO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | oPPOPushService.pushUserSignInNotification(uid, title, content, versionCodeList);
|
| | | oPPOPushService.pushUserSignInNotification(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // VIVO推送
|
| | |
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid,system);
|
| | | vIVOPushService.pushUserSignInNotification(uid, title, content, versionCodeList);
|
| | | vIVOPushService.pushUserSignInNotification(uid, new PushBaseContent(title, content, versionCodeList, system));
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | |
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList) {
|
| | | private List<Integer> getVersionCodeList(List<Integer> versionCodeList, SystemEnum system) {
|
| | | List<Integer> versionList = new ArrayList<>();
|
| | | if (versionCodeList == null) {// 全推
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 51);
|
| | | List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 51,system);
|
| | | if (appInfoList != null)
|
| | | for (AppVersionInfo version : appInfoList) {
|
| | | versionList.add(version.getVersionCode());
|
| | |
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushGoods(Long uid, Long auctionId, PushBaseContent content)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.goodsdetail, uid, title, content, null, null, auctionId, versionCodeList);
|
| | | push(PushTypeEnum.goodsdetail, uid, null, null, auctionId, content);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUrl(Long uid, String url, PushBaseContent content)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.url, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.url, uid, null, url, null, content);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushZNX(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, title, content, null, null, null, versionCodeList);
|
| | | public void pushZNX(Long uid, PushBaseContent content) throws PushException {
|
| | | push(PushTypeEnum.ZNX, uid, null, null, null, content);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | public void pushWEEX(Long uid, String weexUrl, PushBaseContent content)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.weex, uid, title, content, weexUrl, null, null, versionCodeList);
|
| | | push(PushTypeEnum.weex, uid, weexUrl, null, null, content);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | public void pushBaiChuanUrl(Long uid, String url, PushBaseContent content)
|
| | | throws PushException {
|
| | |
|
| | | push(PushTypeEnum.baichuan, uid, title, content, null, url, null, versionCodeList);
|
| | | push(PushTypeEnum.baichuan, uid, null, url, null, content);
|
| | | }
|
| | |
|
| | | @Async("pushExecutor")
|
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushWelfareCenter(Long uid, PushBaseContent content)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.welfare, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.welfare, uid, null, null, null, content);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList)
|
| | | public void pushUserSignInNotification(Long uid, PushBaseContent content)
|
| | | throws PushException {
|
| | | push(PushTypeEnum.signin, uid, title, content, null, null, null, versionCodeList);
|
| | | push(PushTypeEnum.signin, uid, null, null, null, content);
|
| | | }
|
| | |
|
| | | private List<DeviceTokenVIVO> filterDeviceToken(List<DeviceTokenVIVO> deviceList, int hour) {
|
| | |
| | | *
|
| | | * @param type
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @param webUrl
|
| | | * @param versionCodeList
|
| | | */
|
| | | private void push(PushTypeEnum type, Long uid, String title, String content, String url, String webUrl,
|
| | | Long goodsId, List<Integer> versionCodeList) throws PushException {
|
| | | private void push(PushTypeEnum type, Long uid, String url, String webUrl,
|
| | | Long goodsId, PushBaseContent content) throws PushException {
|
| | | int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
|
| | | List<Integer> newVersionList = getVersionCodeList(versionCodeList);
|
| | | List<Integer> newVersionList = getVersionCodeList(content.getVersionCodeList(),content.getSystem());
|
| | | // 2.0.1后开始推送
|
| | | for (int i = 0; i < newVersionList.size(); i++) {
|
| | | if (newVersionList.get(i) < 51)
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | VIVOPushUtil.pushGoods(tokenList, content.getTitle(),content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | VIVOPushUtil.pushUrl(tokenList, content.getTitle(),content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | VIVOPushUtil.pushZNX(tokenList, title, content);
|
| | | VIVOPushUtil.pushZNX(tokenList, content.getTitle(),content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | VIVOPushUtil.pushWEEX(tokenList, content.getTitle(),content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | VIVOPushUtil.pushBaiChuanUrl(tokenList, content.getTitle(),content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | VIVOPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | VIVOPushUtil.pushWelfareCenter(tokenList, content.getTitle(),content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | VIVOPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | VIVOPushUtil.pushUserSignInNotification(tokenList, content.getTitle(),content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.hwError(e);
|
| | |
| | | if (type == PushTypeEnum.goodsdetail) {// 商品详情
|
| | | if (goodsId == null)
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushGoods(tokenList, title, content, 1, goodsId);
|
| | | VIVOPushUtil.pushGoods(tokenList, content.getTitle(), content.getContent(), 1, goodsId);
|
| | | } else if (type == PushTypeEnum.url) {// 链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushUrl(tokenList, title, content, webUrl);
|
| | | VIVOPushUtil.pushUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.ZNX) {// 站内信
|
| | | VIVOPushUtil.pushZNX(tokenList, title, content);
|
| | | VIVOPushUtil.pushZNX(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.weex) {// weex
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushWEEX(tokenList, title, content, url);
|
| | | VIVOPushUtil.pushWEEX(tokenList, content.getTitle(), content.getContent(), url);
|
| | | } else if (type == PushTypeEnum.baichuan) {// 百川链接
|
| | | if (StringUtil.isNullOrEmpty(webUrl))
|
| | | throw new PushException(2, "参数不完整");
|
| | | VIVOPushUtil.pushBaiChuanUrl(tokenList, title, content, webUrl);
|
| | | VIVOPushUtil.pushBaiChuanUrl(tokenList, content.getTitle(), content.getContent(), webUrl);
|
| | | } else if (type == PushTypeEnum.welfare) {// 福利中心
|
| | | VIVOPushUtil.pushWelfareCenter(tokenList, title, content);
|
| | | VIVOPushUtil.pushWelfareCenter(tokenList, content.getTitle(), content.getContent());
|
| | | } else if (type == PushTypeEnum.signin) {// 签到
|
| | | VIVOPushUtil.pushUserSignInNotification(tokenList, title, content);
|
| | | VIVOPushUtil.pushUserSignInNotification(tokenList,content.getTitle(), content.getContent());
|
| | | }
|
| | | } catch (Exception e) {
|
| | | PushLogHelper.vivoError(e);
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private RocketMQManager rocketMQManager;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | |
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | SystemEnum system = userInfoService.getUserSystem(order.getUid());
|
| | | long[] targetUids = new long[] { 3L, 4L };
|
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey(), SystemEnum.blks);
|
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey(),system);
|
| | | String[] sts = config.getValue().split(",");
|
| | | String account = sts[0];
|
| | | String pwd = sts[1];
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.common.CommonConfigService;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | | @Resource
|
| | | private CommonConfigService commonConfigService;
|
| | |
|
| | | @Transactional
|
| | | public void addShamUser(ShamUser shamUser) {
|
| | |
| | | }
|
| | |
|
| | | List<String> imgList = new ArrayList<String>();
|
| | | String value = configService.get(ConfigKeyEnum.shareBonusPicture.getKey());
|
| | | String value = commonConfigService.getValue(ConfigKeyEnum.shareBonusPicture.getKey());
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray array = JSONArray.fromObject(value);
|
| | |
| | |
|
| | | /**
|
| | | * 随机名称
|
| | | *
|
| | | * @return
|
| | | */
|
| | | public String randomName() {
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.*;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserGoodsStorageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsGroupService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | private RedisManager redisManager;
|
| | |
|
| | | @Resource
|
| | | private UserInfoMapper userInfoMapper;
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserAccountService userAccountService;
|
| | |
| | | /**
|
| | | * 多个商品分享生成记录
|
| | | *
|
| | | * @param userShareGoodsRecord
|
| | | * @param listGoods
|
| | | */
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | | /**
|
| | | * 生成分享图
|
| | | *
|
| | | * @param uid
|
| | | * 用户id
|
| | | * @param shareId
|
| | | * 分享记录id
|
| | | * @param source
|
| | | * 来源
|
| | | * @param listGoods
|
| | | * @return
|
| | | * @throws UserShareGoodsRecordException
|
| | |
| | | Long shareId = shareRecord.getId();
|
| | | String source = shareRecord.getSource().name();
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | String url = String.format("http://%s/share_mushGoods.html?uid=%s&shareId=%s&source=%s",
|
| | | configService.getH5Host(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), shareRecord.getId() + "",
|
| | | configService.getH5Host(system), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), shareRecord.getId() + "",
|
| | | source + "");
|
| | |
|
| | | String shortLink = HttpUtil.getShortLink(url);
|
| | |
| | | }
|
| | |
|
| | | // 获取到用户的头像
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | UserInfo user = userInfoService.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null) {
|
| | | throw new UserShareGoodsRecordException(1, "用户信息不存在");
|
| | | }
|
| | |
| | | Long shareId = shareRecord.getId();
|
| | | String source = shareRecord.getSource().name();
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | String url = String.format("http://%s/share_mushGoods.html?uid=%s&shareId=%s&source=%s",
|
| | | configService.getH5Host(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), shareId + "", source + "");
|
| | | configService.getH5Host(system), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), shareId + "", source + "");
|
| | |
|
| | | String shortLink = HttpUtil.getShortLink(url);
|
| | | if (!StringUtil.isNullOrEmpty(shortLink)) {
|
| | |
| | | public String getShareUrlV2(UserShareGoodsRecord shareRecord) {
|
| | | Long uid = shareRecord.getUid();
|
| | | Long shareId = shareRecord.getId();
|
| | |
|
| | | String url = String.format("http://%s/share_mushGoods_1.6.0.html?uid=%s&shareId=%s", configService.getH5Host(),
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | | String url = String.format("http://%s/share_mushGoods_1.6.0.html?uid=%s&shareId=%s", configService.getH5Host(system),
|
| | | AESUtil.encrypt(uid + "", Constant.UIDAESKEY), shareId + "");
|
| | |
|
| | | String shortLink = HttpUtil.getShortLink(url);
|
| | |
| | | /**
|
| | | * 生成分享图
|
| | | *
|
| | | * @param uid
|
| | | * 用户id
|
| | | * @param shareId
|
| | | * 分享记录id
|
| | | * @param source
|
| | | * 来源
|
| | | * @param uid 用户id
|
| | | * @param shareId 分享记录id
|
| | | * @param listGoods
|
| | | * @return
|
| | | * @throws UserShareGoodsRecordException
|
| | |
| | | }
|
| | |
|
| | | // 获取到用户的头像
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | UserInfo user = userInfoService.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null) {
|
| | | throw new UserShareGoodsRecordException(1, "用户信息不存在");
|
| | | }
|
| | |
| | | private PinDuoDuoCacheUtil pinDuoDuoCacheUtil;
|
| | |
|
| | |
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | String wxId = userCloud.getWxId();
|
| | | Integer robotId = userCloud.getRobotId();
|
| | | // 保存发送记录
|
| | |
| | | userCloudSendContentService.save(sendContent);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | @Override
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, "【重要通知】你的云发单微信已掉线。", "需要你重新扫描二维码登录", null, null);
|
| | | pushService.pushZNX(uid, "【重要通知】你的云发单微信已掉线。", "需要你重新扫描二维码登录", null, null, system);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.brand.BrandClass;
|
| | | import com.yeshi.fanli.exception.brand.BrandClassException;
|
| | |
|
| | |
| | | * 查询有效分类
|
| | | * @return
|
| | | */
|
| | | public List<BrandClass> listEffective();
|
| | | public List<BrandClass> listEffective(SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 查询有效分类
|
| | | * @return
|
| | | */
|
| | | public List<BrandClass> listBrandClassEffectiveCache();
|
| | | public List<BrandClass> listBrandClassEffectiveCache(SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 保存品牌信息
|
| | |
| | | * @throws BrandClassException
|
| | | * @throws Exception
|
| | | */
|
| | | public void saveObject(BrandClass record) throws BrandClassException, Exception;
|
| | | public void saveObject(BrandClass record,List<SystemEnum> systemList) throws BrandClassException, Exception;
|
| | |
|
| | | /**
|
| | | * 查询列表
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public List<BrandClass> listQuery(long start, int count, String key, Integer state);
|
| | | public List<BrandClass> listQuery(long start, int count, String key, Integer state,SystemEnum system);
|
| | |
|
| | | public long countQuery(String key, Integer state);
|
| | | public long countQuery(String key, Integer state,SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | * @throws BrandClassException
|
| | | * @throws Exception
|
| | | */
|
| | | public void updateOrder(Long id, Integer moveType) throws BrandClassException, Exception;
|
| | | public void updateOrder(Long id, Integer moveType,SystemEnum system) throws BrandClassException, Exception;
|
| | |
|
| | | /**
|
| | | * 批量删除
|
| | |
| | | public int deleteBatchByPrimaryKey(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 批量删除映射
|
| | | * @param list
|
| | | * @param system
|
| | | */
|
| | | public void deleteSystemMapBatch(List<Long> list,SystemEnum system);
|
| | |
|
| | | /**
|
| | | *
|
| | | * @param id
|
| | | * @return
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.common; |
| | | |
| | | /** |
| | | * 常用配置 |
| | | */ |
| | | public interface CommonConfigService { |
| | | |
| | | public String getValue(String key); |
| | | |
| | | public String getValueCache(String key); |
| | | |
| | | } |
| | |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryValidEvaluateCache(int start, int count); |
| | | public List<GoodsEvaluate> queryValidEvaluateCache(int start, int count,SystemEnum system); |
| | | |
| | | public long countValid(); |
| | | public long countValid(SystemEnum system); |
| | | |
| | | /** |
| | | * 查询 |
| | |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum); |
| | | public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum,SystemEnum system); |
| | | |
| | | public long count(String key, Integer state,int dynamicType, String typeEnum); |
| | | public long count(String key, Integer state,int dynamicType, String typeEnum,SystemEnum system); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<GoodsEvaluate> queryMaterialsCache(int start, int count,int type) throws Exception; |
| | | public List<GoodsEvaluate> queryMaterialsCache(int start, int count,int type,SystemEnum system) throws Exception; |
| | | |
| | | public long countValidMaterials(int type); |
| | | public long countValidMaterials(int type,SystemEnum system); |
| | | |
| | | |
| | | |
| | |
| | | public void updateSuningGoods(SuningGoodsInfo goods); |
| | | |
| | | |
| | | public void addRanDomShareCount(); |
| | | public void addRanDomShareCount(SystemEnum system); |
| | | |
| | | /** |
| | | * 添加发圈内容 |
| | |
| | | * @param goodsType |
| | | * @return |
| | | */ |
| | | public GoodsEvaluate queryExistSingle(String goodsId, int goodsType); |
| | | public GoodsEvaluate queryExistSingle(String goodsId, int goodsType,SystemEnum system); |
| | | |
| | | /** |
| | | * 查询倒序 |
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.bus.help.AppPageNotification;
|
| | |
|
| | | /**
|
| | |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public AppPageNotification getAppPageNotificationByType(String type);
|
| | | public AppPageNotification getAppPageNotificationByType(String type, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * 后端列表查询
|
| | | * @return
|
| | | */
|
| | | public List<AppPageNotification> listQuery(long start, int count,String key, Integer show, Integer canClose);
|
| | | public List<AppPageNotification> listQuery(long start, int count,String key, Integer show, Integer canClose, SystemEnum system);
|
| | |
|
| | | public long countQuery(String key, Integer show, Integer canClose);
|
| | | public long countQuery(String key, Integer show, Integer canClose, SystemEnum system);
|
| | |
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode);
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode, SystemEnum system);
|
| | |
|
| | |
|
| | | public void updateByPrimaryKey(AppPageNotification record);
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.help.HelpCenter;
|
| | |
| | | * @param pageIndex 页码
|
| | | * @param pageSize 页面条数
|
| | | * @param key 搜索条件
|
| | | * @param startTime 起始时间
|
| | | * @param endTime 结束时间
|
| | | * @return
|
| | | */
|
| | | public List<HelpCenter> query(int pageIndex, int pageSize, String key, Long cid, Integer orderMode,Integer state) ;
|
| | | public List<HelpCenter> query(int pageIndex, int pageSize, String key, Long cid, Integer orderMode, Integer state, SystemEnum system) ;
|
| | |
|
| | | public long countQuery(String key, Long cid,Integer state);
|
| | | public long countQuery(String key, Long cid,Integer state, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | /**
|
| | | * 查询 只返回id、title
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @return
|
| | | * @throws HelpCenterException
|
| | | */
|
| | | public List<HelpCenter> listValid(long pageId, int pageSize, String key, Long cid);
|
| | | public List<HelpCenter> listValid(long pageId, int pageSize, String key, Long cid, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | import java.io.IOException;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.help.HelpClass;
|
| | |
| | | * @param endTime 结束时间
|
| | | * @return
|
| | | */
|
| | | public List<HelpClass> query(int start, int count, String key, Integer state) throws HelpClassException;
|
| | | public List<HelpClass> query(int start, int count, String key, Integer state, SystemEnum system) throws HelpClassException;
|
| | |
|
| | | public long countQuery(String key, Integer state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param id
|
| | | * @throws HelpClassException
|
| | | */
|
| | | public void updateSort(Integer moveType, Long id) throws HelpClassException;
|
| | | public void updateSort(Integer moveType, Long id, SystemEnum system) throws HelpClassException;
|
| | |
|
| | | /**
|
| | | * 上传图片
|
| | |
| | | * @return
|
| | | * @throws HelpClassException
|
| | | */
|
| | | public List<HelpClass> getClassByState(Integer state) throws HelpClassException;
|
| | | public List<HelpClass> getClassByState(Integer state, SystemEnum system) throws HelpClassException;
|
| | |
|
| | | /**
|
| | | * 查询所有选项提供选择
|
| | | * @return
|
| | | * @throws HelpClassException
|
| | | */
|
| | | public List<HelpClass> getProvidedClass() throws HelpClassException;
|
| | | public List<HelpClass> getProvidedClass( SystemEnum system) throws HelpClassException;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | |
| | | * 保存
|
| | | * @param file
|
| | | * @param record
|
| | | * @param jumpType
|
| | | * @throws HomeNavbarException
|
| | | * @throws Exception
|
| | | */
|
| | |
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<HomeNavbar> listQuery(long start, int count, String key, Integer sex);
|
| | | public List<HomeNavbar> listQuery(long start, int count, String key, Integer sex, SystemEnum system);
|
| | |
|
| | | public long countlistQuery(String key, Integer sex);
|
| | | public long countlistQuery(String key, Integer sex, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询有效导航栏
|
| | | * @return
|
| | | */
|
| | | public List<HomeNavbar> listQueryEffectiveNavbar();
|
| | | public List<HomeNavbar> listQueryEffectiveNavbar(SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 根据分类查询有效导航栏
|
| | | * @param classId
|
| | | * @return
|
| | | */
|
| | | public HomeNavbar getEffectiveByClassId(@Param("classId") Long classId);
|
| | | public HomeNavbar getEffectiveByClassId(@Param("classId") Long classId, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 默认导航栏
|
| | | * @return
|
| | | */
|
| | | public List<HomeNavbar> listQueryDefaultNavbar(Integer sex);
|
| | | public List<HomeNavbar> listQueryDefaultNavbar(Integer sex, SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 固定的导航栏
|
| | | * @return
|
| | | */
|
| | | public List<HomeNavbar> listQueryFixedNavbar();
|
| | | public List<HomeNavbar> listQueryFixedNavbar(SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 改变状态
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser;
|
| | | import com.yeshi.fanli.exception.homemodule.HomeNavbarUserException;
|
| | |
| | | * @param device
|
| | | * @throws HomeNavbarUserException
|
| | | */
|
| | | public List<HomeNavbar> restoreSystemDefault(Long uid, String device) throws HomeNavbarUserException;
|
| | | public List<HomeNavbar> restoreSystemDefault(Long uid, String device, SystemEnum system) throws HomeNavbarUserException;
|
| | |
|
| | | /**
|
| | | * 查询用户已选导航栏
|
| | |
| | |
|
| | | public int updateByPrimaryKey(SuperHomeNavbar record);
|
| | |
|
| | | /**
|
| | | * 根据系统id获取导航
|
| | | * @param systemId 系统id
|
| | | * @return
|
| | | */
|
| | | public List<SuperHomeNavbar> listBySystem(Long systemId);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据系统id获取导航 +缓存
|
| | | * @param systemId 系统id
|
| | | * @return
|
| | | */
|
| | | List<SuperHomeNavbar> listBySystemCache(Long systemId);
|
| | | |
| | | |
| | | /**
|
| | | * 根据导航栏id 批量查询
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | List<SuperHomeNavbar> listByNavbarIds(List<Long> list);
|
| | | |
| | | |
| | | /**
|
| | | * 根据导航栏id 批量删除
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | void deleteBatchByNavbarIds(List<Long> list);
|
| | | |
| | | /**
|
| | | * 根据系统id+导航id查询
|
| | | * @param systemId 系统id
|
| | | * @return
|
| | | */
|
| | | List<SuperHomeNavbar> querybyNavbarId(Long navbarId, Long systemId);
|
| | | |
| | | /**
|
| | | * 根据系统id+导航id 删除
|
| | | * @param systemId 系统id
|
| | | * @return
|
| | | */
|
| | | int deletebyNavbarId(Long navbarId, Long systemId);
|
| | | |
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 华为推送服务
|
| | |
| | | * 推送商品
|
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | void pushGoods(Long uid, Long auctionId, PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | void pushUrl(Long uid, String url,PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送站内信
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushZNX(Long uId, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushZNX(Long uId,PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送weex页面
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param weexUrl
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | void pushWEEX(Long uid, String weexUrl,PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送百川网页
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @throws PushException
|
| | | */
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | void pushBaiChuanUrl(Long uid, String url,PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送福利中心(版本号:1.5.1后)
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | |
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushWelfareCenter(Long uid,PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送签到提醒
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param versions
|
| | |
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushUserSignInNotification(Long uid, PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
|
| | | /**
|
| | |
| | | * 推送商品
|
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | |
|
| | | * @throws PushException
|
| | | */
|
| | | void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | void pushGoods(Long uid, Long auctionId, PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | void pushUrl(Long uid, String url, PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送站内信
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushZNX(Long uId, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushZNX(Long uId, PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送weex页面
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param weexUrl
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | void pushWEEX(Long uid,String weexUrl, PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送百川网页
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @throws PushException
|
| | | */
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | void pushBaiChuanUrl(Long uid,String url, PushBaseContent baseContent)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送福利中心(版本号:1.5.1后)
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushWelfareCenter(Long uid, PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送签到提醒
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param versions
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushUserSignInNotification(Long uid, PushBaseContent baseContent) throws PushException;
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.push.PushCoupon;
|
| | | import com.yeshi.fanli.exception.push.PushCouponException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<PushCoupon> listQuery(long start, int count, String key, Integer state);
|
| | | public List<PushCoupon> listQuery(long start, int count, String key, Integer state, SystemEnum system);
|
| | |
|
| | | public long countQuery(String key, Integer state) throws PushCouponException;
|
| | | public long countQuery(String key, Integer state, SystemEnum system) throws PushCouponException;
|
| | |
|
| | |
|
| | | public void save(PushCoupon record) throws PushCouponException, Exception;
|
| | |
| | | * 有效活动
|
| | | * @return
|
| | | */
|
| | | public List<PushCoupon> listQueryEffective();
|
| | | public List<PushCoupon> listQueryEffective( SystemEnum system);
|
| | |
|
| | |
|
| | | }
|
| | |
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.exception.push.PushGoodsException;
|
| | |
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<PushGoods> listQuery(long start, int count, String key, Integer state);
|
| | | public List<PushGoods> listQuery(long start, int count, String key, Integer state, SystemEnum system);
|
| | |
|
| | | public long countQuery(String key, Integer state);
|
| | | public long countQuery(String key, Integer state, SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 获取历史推送商品信息
|
| | |
| | | * @param pushTime
|
| | | * @return
|
| | | */
|
| | | public List<PushGoods> listHistoryByPushTime(long start, int count, Long uid, Date pushTime);
|
| | | public List<PushGoods> listHistoryByPushTime(long start, int count, Long uid, Date pushTime, SystemEnum system);
|
| | |
|
| | | public long countHistoryByPushTime(Long uid, Date pushTime);
|
| | | public long countHistoryByPushTime(Long uid, Date pushTime, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * 定时推送任务
|
| | | * @return
|
| | | */
|
| | | public List<PushGoods> listTask();
|
| | | public List<PushGoods> listTask(SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 定时推送处理
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.push.PushInfo;
|
| | | import com.yeshi.fanli.exception.push.PushCouponException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
| | |
|
| | | /**
|
| | | * 后端查询
|
| | | *
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public List<PushInfo> listQuery(long start, int count, String key, Integer keyType, Integer state, String type);
|
| | | public List<PushInfo> listQuery(long start, int count, String key, Integer keyType, Integer state, String type, SystemEnum system);
|
| | |
|
| | | public long countQuery(String key, Integer keyType, Integer state, String type);
|
| | | public long countQuery(String key, Integer keyType, Integer state, String type, SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | * 后端手动推送
|
| | | *
|
| | | * @param id
|
| | | * @throws Exception
|
| | | * @throws PushInfoException
|
| | |
| | |
|
| | | /**
|
| | | * 执行推送
|
| | | *
|
| | | * @param id
|
| | | * @throws Exception
|
| | | * @throws PushCouponException
|
| | |
| | |
|
| | | /**
|
| | | * 需要推送的任务
|
| | | *
|
| | | * @return
|
| | | */
|
| | | public List<PushInfo> listTask();
|
| | | public List<PushInfo> listTask(SystemEnum system);
|
| | |
|
| | |
|
| | | /**
|
| | | *定时任务推送
|
| | | *
|
| | | * @param record
|
| | | */
|
| | | public void taskPush(PushInfo record);
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushBaseContent;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
|
| | | /**
|
| | | * 华为推送服务
|
| | | *
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface VIVOPushService {
|
| | |
|
| | |
| | | * 推送商品
|
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushGoods(Long uid, Long auctionId, String title, String content, List<Integer> versionCodeList)
|
| | | void pushGoods(Long uid, Long auctionId, PushBaseContent content)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @param uid
|
| | | * @param url
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUrl(Long uid, String url, String title, String content, List<Integer> versionCodeList)
|
| | | void pushUrl(Long uid, String url, PushBaseContent content)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送站内信
|
| | | *
|
| | | * @param uId
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushZNX(Long uId, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushZNX(Long uId, PushBaseContent content) throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送weex页面
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param weexUrl
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWEEX(Long uid, String title, String content, String weexUrl, List<Integer> versionCodeList)
|
| | | void pushWEEX(Long uid, String weexUrl, PushBaseContent content)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 适用版本 1.4.8及以后 推送百川网页
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param url
|
| | | * @throws PushException
|
| | | */
|
| | | void pushBaiChuanUrl(Long uid, String title, String content, String url, List<Integer> versionCodeList)
|
| | | void pushBaiChuanUrl(Long uid, String url, PushBaseContent content)
|
| | | throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送福利中心(版本号:1.5.1后)
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @throws PushException
|
| | | */
|
| | | void pushWelfareCenter(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushWelfareCenter(Long uid, PushBaseContent content) throws PushException;
|
| | |
|
| | | /**
|
| | | * 推送签到提醒
|
| | | *
|
| | | * @param uid
|
| | | * @param title
|
| | | * @param content
|
| | | * @param versions
|
| | | * @throws PushException
|
| | | */
|
| | | void pushUserSignInNotification(Long uid, String title, String content, List<Integer> versionCodeList) throws PushException;
|
| | | void pushUserSignInNotification(Long uid, PushBaseContent content) throws PushException;
|
| | |
|
| | | }
|
| | |
| | |
|
| | | // 触发品牌商品列表
|
| | | public void requestBrandGoods() {
|
| | | List<BrandClass> list = brandClassService.listBrandClassEffectiveCache();
|
| | | List<BrandClass> list = brandClassService.listBrandClassEffectiveCache(null);
|
| | | list.add(new BrandClass(0L));
|
| | | list.addAll(list);
|
| | | for (int p = 1; p < 5; p++) {
|
| | |
| | | @Test
|
| | | public void test2() {
|
| | | AppVersionService appVersionService = com.yeshi.fanli.util.BeanUtil.getBean(AppVersionService.class);
|
| | | List<AppVersionInfo> list = appVersionService.getAppVersionInfoListByPlatform(AppVersionInfo.PLATFORM_ANDROID);
|
| | | appVersionService.getAppVersionInfoListByPlatformAndVersion(AppVersionInfo.PLATFORM_ANDROID, 26);
|
| | | List<AppVersionInfo> list = appVersionService.getAppVersionInfoListByPlatform(AppVersionInfo.PLATFORM_ANDROID,null);
|
| | | appVersionService.getAppVersionInfoListByPlatformAndVersion(AppVersionInfo.PLATFORM_ANDROID, 26,null);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package org.fanli;
|
| | |
|
| | | import com.yeshi.fanli.entity.brand.BrandClassSystemMap;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.config.CommonConfig;
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import org.junit.Test;
|
| | | import org.yeshi.utils.mybatis.ColumnParseUtil;
|
| | |
| | |
|
| | | @Test
|
| | | public void test3() {
|
| | | MyBatisMapperUtil.createMapper(SuningOrderInfo.class);
|
| | | // MyBatisMapperUtil.createMapper(VipShopOrderDetail.class);
|
| | | MyBatisMapperUtil.createMapper(CommonConfig.class);
|
| | | MyBatisMapperUtil.createMapper(BrandClassSystemMap.class);
|
| | | // MyBatisMapperUtil.createMapper(VipShopAfterSaleDetailInfo.class);
|
| | | }
|
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | ColumnParseUtil.parseColumn(BusinessSystem.class,
|
| | | "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\java\\com\\yeshi\\fanli\\mapping\\BusinessSystemMapper.xml");
|
| | | ColumnParseUtil.parseColumn(PushGoods.class,
|
| | | "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\java\\com\\yeshi\\fanli\\mapping\\push\\PushGoodsMapper.xml");
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | brandInfo.setIcon("http://ec-1255749512.file.myqcloud.com/img/TaoBaoShop/2bb853de35d845da85b7b10df42424d4.jpeg");
|
| | | brandInfo.setSearchKey("GAP");
|
| | |
|
| | | service.addBrandGoods(brandInfo);
|
| | | service.addBrandGoods(brandInfo,null);
|
| | | System.out.println("test");
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|