Merge remote-tracking branch 'origin/master'
Conflicts:
fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java
| | |
| | | @Aspect
|
| | | public class LoginAspect {
|
| | |
|
| | | @Around("execution(public * com.yeshi.fanli.controller.admin.*.*(..))")
|
| | | // @Around("execution(public * com.yeshi.fanli.controller.admin.*.*(..))")
|
| | | public Object verifyLoginState(ProceedingJoinPoint joinPoint) throws IOException {
|
| | |
|
| | | Signature signature = joinPoint.getSignature();
|
| | |
| | | KEY = Constant.systemCommonConfig.getSignKey();
|
| | | }
|
| | |
|
| | | @Around(EDP)
|
| | | // @Around(EDP)
|
| | | public Object testAround(ProceedingJoinPoint joinPoint) throws IOException {
|
| | | Object[] args = joinPoint.getArgs();
|
| | | PrintWriter out = null;
|
| | |
| | | }
|
| | |
|
| | | Integer state = resultObj.getState();
|
| | | if (state != null && state.equals(0)) {
|
| | | resultObj.setState(1);
|
| | | } else {
|
| | | if (state == null || state.equals(1) || state == 1) {
|
| | | resultObj.setState(0);
|
| | | } else {
|
| | | resultObj.setState(1);
|
| | | }
|
| | |
|
| | | swiperBannerService.updateByPrimaryKeySelective(resultObj);
|
| | |
| | | int maxOrder = swiperPictureService.getMaxOrderByBannerID(bannerId);
|
| | | record.setOrder(maxOrder + 1);
|
| | |
|
| | | record.setState(1);
|
| | | record.setState(0);
|
| | | record.setCreatetime(new Date());
|
| | | record.setUpdatetime(new Date());
|
| | |
|
| | |
| | | }
|
| | |
|
| | | Integer state = resultObj.getState();
|
| | | if (state != null && state.equals(0)) {
|
| | | resultObj.setState(1);
|
| | | } else {
|
| | | if (state == null || state.equals(1) || state == 1) {
|
| | | resultObj.setState(0);
|
| | | } else {
|
| | | resultObj.setState(1);
|
| | | }
|
| | |
|
| | | swiperPictureService.updateByPrimaryKeySelective(resultObj);
|
| | |
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private QualityGoodsService qualityGoodsService;
|
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | |
|
| | | /**
|
| | | * 获取主类目
|
| | |
| | | * @param page
|
| | | * @param scid
|
| | | * @param filter
|
| | | * @param order 来源:【推荐:0 | 综合:4 、综合只看有券 1 、综合只看天猫 1 | 价格:低到高3 高到低2 | 销量:1】
|
| | | * 排序值:【销量由高到低: 1 ; 销量由低到高 5; 价格从高到低: 2 ; 价格从低到高:3 ; 推广量高到低:4 ; 其他默认: 销量由高到低】
|
| | | * |
| | | * @param order
|
| | | * 来源:【推荐:0 | 综合:4 、综合只看有券 1 、综合只看天猫 1 | 价格:低到高3 高到低2 | 销量:1】
|
| | | * 排序值:【销量由高到低: 1 ; 销量由低到高 5; 价格从高到低: 2 ; 价格从低到高:3 ; 推广量高到低:4 ;
|
| | | * 其他默认: 销量由高到低】
|
| | | * |
| | | * @param startprice
|
| | | * 起始价格
|
| | | * @param endprice
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | |
| | |
|
| | | GoodsSubClass goodsSubClass = goodsSubClassService.getSubClassByPrimaryKeyCache(scid);
|
| | | if (goodsSubClass == null) {
|
| | | out.print(JsonUtil.loadFalseResult("不存在该分类"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | if (page == 0) {
|
| | | // 统计点击量
|
| | | goodsSubClassService.countClick(acceptData, goodsSubClass);
|
| | | }
|
| | | |
| | |
|
| | | /* 搜索关键词 */
|
| | | String searchKey = goodsSubClass.getName();
|
| | | String key = goodsSubClass.getKey();
|
| | | if (key != null && !"".equals(key.trim())) {
|
| | | searchKey = key;
|
| | | }
|
| | | |
| | |
|
| | | /* 商品系统分类id */
|
| | | Long systemCid = null;
|
| | | GoodsClass rootClass = goodsSubClass.getRootClass();
|
| | | if (rootClass != null) {
|
| | | systemCid = rootClass.getId();
|
| | | }
|
| | | |
| | | |
| | |
|
| | | // page从1开始
|
| | | page += 1;
|
| | | // 请求淘宝接口页码
|
| | | int pageNo = page; |
| | | |
| | | int pageNo = page;
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | /* 查询推荐模块 清空其他非必要筛选项和排序项 */
|
| | |
|
| | | /* 查询推荐模块 清空其他非必要筛选项和排序项 */
|
| | | if (!StringUtil.isNullOrEmpty(order) && Integer.parseInt(order) == 0) {
|
| | | |
| | |
|
| | | // 分类关联标签id集合
|
| | | List<Long> listLabId = |
| | | labelClassService.getRelationLabIds((page - 1) * pageSize, pageSize, goodsSubClass.getId());
|
| | | |
| | | List<Long> listLabId = labelClassService.getRelationLabIds((page - 1) * pageSize, pageSize,
|
| | | goodsSubClass.getId());
|
| | |
|
| | | /* 计算精选库数据 总页数 */
|
| | | long incount = taoKeGoodsService.countByQuality(searchKey, systemCid, listLabId);
|
| | |
|
| | | int totalPage = (int) (incount % pageSize == 0 ? incount / pageSize : incount / pageSize + 1);
|
| | | |
| | |
|
| | | pageNo = page - totalPage;
|
| | | |
| | | |
| | |
|
| | | /* 查询精选库数据 */
|
| | | if (pageNo <= 0 ) {
|
| | | |
| | | List<QualityFactory> listQuality = taoKeGoodsService.queryByQuality((page - 1) * pageSize,
|
| | | pageSize,searchKey, systemCid, listLabId);
|
| | | |
| | | if (pageNo <= 0) {
|
| | |
|
| | | List<QualityFactory> listQuality = taoKeGoodsService.queryByQuality((page - 1) * pageSize, pageSize,
|
| | | searchKey, systemCid, listLabId);
|
| | |
|
| | | List<TaoBaoGoodsBrief> searchWuLiaoList = null;
|
| | | |
| | | /* 精选库数据不足10条 */
|
| | |
|
| | | /* 精选库数据不足10条 */
|
| | | if (listQuality != null && listQuality.size() != 0 && listQuality.size() < 10) {
|
| | | |
| | |
|
| | | String searchParam = goodsSubClass.getSearchJson();
|
| | | |
| | |
|
| | | Gson gs = new Gson();
|
| | | SearchFilter searchfilter = gs.fromJson(searchParam, SearchFilter.class);
|
| | | |
| | |
|
| | | int quanfilter = searchfilter.getQuan();
|
| | | if (quanfilter != 1) {
|
| | | searchfilter.setQuan(1);
|
| | |
| | | if (endPricefilter == null) {
|
| | | searchfilter.setEndPrice(new BigDecimal(220));
|
| | | }
|
| | | |
| | |
|
| | | boolean includeGoodRate = searchfilter.isIncludeGoodRate();
|
| | | if (!includeGoodRate) {
|
| | | searchfilter.setIncludeGoodRate(true);
|
| | | }
|
| | | |
| | | //请求第一页数据
|
| | |
|
| | | // 请求第一页数据
|
| | | searchfilter.setPage(1);
|
| | | searchfilter.setPageSize(pageSize);
|
| | | searchfilter.setKey(searchKey);
|
| | | searchfilter.setMaterialId("6707");
|
| | | |
| | |
|
| | | searchWuLiaoList = taoKeGoodsService.searchWuLiaoList(searchfilter);
|
| | | }
|
| | |
|
| | | Map<String, String> map = manageService.convertMap();
|
| | | |
| | |
|
| | | JSONObject data = taoKeGoodsService.listQualityGoods(listQuality, searchWuLiaoList, map);
|
| | | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | |
|
| | | return;
|
| | | }
|
| | | |
| | | |
| | | if (pageNo > 0 && totalPage > 0) {
|
| | | List<QualityFactory> list = taoKeGoodsService.queryByQuality((totalPage - 1) * pageSize,
|
| | | pageSize, searchKey, systemCid, listLabId);
|
| | | |
| | |
|
| | | if (pageNo > 0 && totalPage > 0) {
|
| | | List<QualityFactory> list = taoKeGoodsService.queryByQuality((totalPage - 1) * pageSize, pageSize,
|
| | | searchKey, systemCid, listLabId);
|
| | |
|
| | | if (list != null && list.size() != 0 && list.size() < 10) {
|
| | | // 页码+ 1 已请求一次淘宝接口
|
| | | pageNo += 1 ;
|
| | | pageNo += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /* 网络请求 */
|
| | |
|
| | | /* 网络请求 */
|
| | | SearchFilter searchfilter = null;
|
| | | String searchParam = goodsSubClass.getSearchJson();
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(searchParam) && !StringUtil.isNullOrEmpty(order) |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(searchParam) && !StringUtil.isNullOrEmpty(order)
|
| | | && Integer.parseInt(order) == 0) {
|
| | | // 推荐 使用子分类默认查询条件
|
| | | Gson gs = new Gson();
|
| | | searchfilter = gs.fromJson(searchParam, SearchFilter.class);
|
| | | |
| | |
|
| | | int quanfilter = searchfilter.getQuan();
|
| | | if (quanfilter != 1) {
|
| | | searchfilter.setQuan(1);
|
| | |
| | | if (endPricefilter == null) {
|
| | | searchfilter.setEndPrice(new BigDecimal(220));
|
| | | }
|
| | | |
| | |
|
| | | boolean includeGoodRate = searchfilter.isIncludeGoodRate();
|
| | | if (!includeGoodRate) {
|
| | | searchfilter.setIncludeGoodRate(true);
|
| | | }
|
| | | |
| | |
|
| | | } else {
|
| | | searchfilter = new SearchFilter();
|
| | | // 设置SearchFilter
|
| | | taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter, totalSales);
|
| | | taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter,
|
| | | totalSales);
|
| | | }
|
| | |
|
| | | searchfilter.setPage(pageNo);
|
| | | searchfilter.setPageSize(pageSize);
|
| | | searchfilter.setKey(searchKey);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(order) && Integer.parseInt(order) != 4 ) {
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(order) && Integer.parseInt(order) != 4) {
|
| | | searchfilter.setMaterialId("6707");
|
| | | }
|
| | | |
| | |
|
| | | // 查询物料接口
|
| | | JSONObject result = taoKeGoodsService.searchWuLiao(searchfilter);
|
| | | out.print(JsonUtil.loadTrueResult(result));
|
| | |
| | | }
|
| | |
|
| | | @RequestMapping("getCouponList")
|
| | | public void getCouponList(AcceptData acceptData, int page, PrintWriter out) {
|
| | | public void getCouponList(AcceptData acceptData, int page, HttpServletRequest request, PrintWriter out) {
|
| | | page = page > 0 ? page : 1;
|
| | | List<TaoBaoGoodsBrief> taoBaoGoodsBriefs = taoBaoCouponService.getTaoBaoCouponList(page);
|
| | | Map<String, String> map = manageService.convertMap();
|
| | |
| | | data.put("taoBaoCoupons", array);
|
| | | data.put("count", count);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | try {
|
| | | monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, 0, 0, null));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | @RequestMapping(value={"getcategory"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
|
| | |
|
| | | @RequestMapping(value = { "getcategory" }, method = { org.springframework.web.bind.annotation.RequestMethod.POST })
|
| | | public void getcategory(AcceptData acceptData, PrintWriter out) {
|
| | | com.yeshi.fanli.entity.system.System system = this.systemService
|
| | | .getSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | com.yeshi.fanli.entity.system.System system = this.systemService.getSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | return;
|
| | |
| | | long gcid = goodsClass.getId();
|
| | | try {
|
| | | List<GoodsSubClass> subClassList = this.goodsSubClassService.getSubClassCache(Long.valueOf(gcid),
|
| | | Integer.valueOf(1));
|
| | | Integer.valueOf(1));
|
| | | if ((subClassList == null) || (subClassList.size() == 0)) {
|
| | | subClassList = new ArrayList<GoodsSubClass>();
|
| | | }
|
| | |
| | | import java.io.PrintWriter;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | |
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | @Resource
|
| | | private TaoBaoUnionConfigService taoBaoUnionConfigService;
|
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | |
|
| | | /**
|
| | | * 获取淘宝的分享链接
|
| | | *
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "gettaobaolink")
|
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) {
|
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, Long auctionId, HttpServletRequest request,
|
| | | PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户ID不能为空"));
|
| | | return;
|
| | |
| | | data.put("type", 1);
|
| | | data.put("link", link);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, 0, 0, "购买淘宝商品转链出错"));
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | TBPid tbPid = null;
|
| | | if (acceptData.getPlatform().equalsIgnoreCase("android")) {
|
| | | tbPid = tbPidService.getTBPid(uid, PidUser.TYPE_FANLI_ANDROID);
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.IPUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | | import org.yeshi.utils.NumberUtil; |
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | |
|
| | | @Resource
|
| | | private ShamUserService shamUserService;
|
| | | |
| | | @Resource
|
| | | private SpecialService specialService;
|
| | |
|
| | | @Resource
|
| | | private SwiperPictureService swiperPictureService;
|
| | | |
| | | |
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | |
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 新版推荐专题管理(1.4.0)
|
| | | *
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 商品基本详情 (1.4.0)
|
| | | *
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.mongodb.util.ThreadUtil;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink;
|
| | | import com.yeshi.fanli.exception.ShareGoodsException;
|
| | | import com.yeshi.fanli.service.impl.goods.ShareGoodsServiceImpl;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | |
|
| | | // 获取商品分享链接
|
| | | @RequestMapping(value = "getGoodsShareUrl")
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "gettaobaosharelink")
|
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) {
|
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, Long auctionId, HttpServletRequest request,
|
| | | PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户ID不能为空"));
|
| | | return;
|
| | |
| | |
|
| | | data.put("clickUrl", url);
|
| | | data.put("token", taoBaoLink.getTaoToken());
|
| | | data.put("rule", "http://flq.yeshitv.com/fanli/client/html/help_item.html?id=8");
|
| | | data.put("rule",
|
| | | "http://apph5.yeshitv.com/apppage/all_help_content.html?id=148&from=singlemessage&isappinstalled=0");
|
| | | data.put("pictUrl", TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500));
|
| | |
|
| | | String shareText = "";
|
| | |
| | | }
|
| | | shareText = shareText.replace("[价格类型]", shopType);
|
| | | data.put("shareText", shareText);
|
| | | String descText=shareText.replace(taoBaoLink.getGoods().getTitle()+"\r\n", "");
|
| | | if(descText.startsWith("\\r\\n"))
|
| | | descText=descText.substring(0);
|
| | | data.put("descText",descText );
|
| | | String descText = shareText.replace(taoBaoLink.getGoods().getTitle() + "\r\n", "");
|
| | | if (descText.startsWith("\\r\\n"))
|
| | | descText = descText.substring(0);
|
| | | data.put("descText", descText);
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal rate = new BigDecimal(hongBaoManageService.get("hongbao_goods_proportion"));
|
| | |
| | | });
|
| | | return;
|
| | | } catch (ShareGoodsException e) {
|
| | | try {
|
| | | monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, e.getCode(), 0, "分享出错"));
|
| | | } catch (Exception e1) {
|
| | | }
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMessage()));
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.dao.mybatis.homemodule; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SpecialCard; |
| | | |
| | | public interface SpecialCardMapper { |
| | |
| | | int updateByPrimaryKeySelective(SpecialCard record); |
| | | |
| | | int updateByPrimaryKey(SpecialCard record); |
| | | |
| | | |
| | | int deleteBatchByPrimaryKey(List<Long> list); |
| | | |
| | | |
| | | List<SpecialCard> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key, |
| | | @Param("sort") Integer sort); |
| | | |
| | | long countlistQuery(@Param("key") String key); |
| | | |
| | | |
| | | } |
| | |
| | | package com.yeshi.fanli.dao.mybatis.homemodule; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.entity.bus.homemodule.Special; |
| | | |
| | | public interface SpecialMapper { |
| | |
| | | int updateByPrimaryKeySelective(Special record); |
| | | |
| | | int updateByPrimaryKey(Special record); |
| | | |
| | | int deleteBatchByPrimaryKey(List<Long> list); |
| | | |
| | | int deleteBatchByCardID(List<Long> list); |
| | | /** |
| | | * 批量查询id |
| | | * @param list |
| | | * @return |
| | | */ |
| | | List<Special> queryByListPrimaryKey(List<Long> list); |
| | | |
| | | /** |
| | | * 批量查询CardID |
| | | * @param list |
| | | * @return |
| | | */ |
| | | List<Special> queryByListCardID(List<Long> list); |
| | | |
| | | /** |
| | | * 查询需替换顺序数据 |
| | | * @param cardId |
| | | * @param type |
| | | * @param order |
| | | * @return |
| | | */ |
| | | List<Special> getOrderByCardID(@Param("cardId") Long cardId, @Param("type") Integer type, |
| | | @Param("order") Integer order); |
| | | |
| | | |
| | | List<Special> listQueryByCard(@Param("start") long start, @Param("count") int count, |
| | | @Param("cardId") Long card, @Param("key") String key); |
| | | |
| | | long countlistQueryByCard(@Param("cardId") Long card, @Param("key") String key); |
| | | |
| | | /** |
| | | * 获取最大的排序值 |
| | | * @param card |
| | | * @return |
| | | */ |
| | | int getMaxOrderByCard(@Param("cardId") Long card); |
| | | |
| | | /** |
| | | * 根据标识、系统查询启用专题 |
| | | * @param card |
| | | * @param systemId |
| | | * @return |
| | | */ |
| | | List<Special> listBySystemAndCard(@Param("card") String card, @Param("systemId") Long systemId); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.monitor; |
| | | |
| | | import com.yeshi.fanli.entity.monitor.ClientAPIMonitor; |
| | | |
| | | public interface ClientAPIMonitorMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(ClientAPIMonitor record); |
| | | |
| | | int insertSelective(ClientAPIMonitor record); |
| | | |
| | | ClientAPIMonitor selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(ClientAPIMonitor record); |
| | | |
| | | int updateByPrimaryKey(ClientAPIMonitor record); |
| | | } |
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "b_card")
|
| | | private String card;
|
| | |
|
| | | // Android链接
|
| | | // 标识管理id
|
| | | @JoinColumn(name = "b_card_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_card_id")
|
| | | private Long cardId;
|
| | | |
| | | |
| | | // 主图
|
| | | @JoinColumn(name = "b_main_picture")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_main_picture")
|
| | | private String picture;
|
| | |
|
| | | // IOS跳转链接
|
| | | |
| | | // 附图
|
| | | @JoinColumn(name = "b_sub_picture")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_sub_picture")
|
| | | private String subPicture;
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "b_orderby")
|
| | | private Integer orderby;
|
| | |
|
| | | // 状态
|
| | | @JoinColumn(name = "b_state")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_state")
|
| | | private Long state;
|
| | | |
| | | // 显示类型
|
| | | @JoinColumn(name = "b_show_type")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_show_type")
|
| | | private String showType;
|
| | | |
| | | // 备注
|
| | | @JoinColumn(name = "b_remark")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_remark")
|
| | | private String remark;
|
| | | |
| | | // 创建时间
|
| | | @JoinColumn(name = "b_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "b_createtime")
|
| | |
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public Long getCardId() {
|
| | | return cardId;
|
| | | }
|
| | |
|
| | | public void setCardId(Long cardId) {
|
| | | this.cardId = cardId;
|
| | | }
|
| | |
|
| | | public Long getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(Long state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getShowType() {
|
| | | return showType;
|
| | | }
|
| | |
|
| | | public void setShowType(String showType) {
|
| | | this.showType = showType;
|
| | | }
|
| | |
|
| | | public String getRemark() {
|
| | | return remark;
|
| | | }
|
| | |
|
| | | public void setRemark(String remark) {
|
| | | this.remark = remark;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | |
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | /**
|
| | | * 专题标识管理
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "cd_card")
|
| | | private String card;
|
| | |
|
| | | // 匹配标识
|
| | | @JoinColumn(name = "cd_state")
|
| | | @org.yeshi.utils.mybatis.Column(name = "cd_state")
|
| | | private Integer state; |
| | | |
| | | // 创建时间
|
| | | @JoinColumn(name = "cd_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "cd_createtime")
|
| | |
| | | @JoinColumn(name = "cd_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "cd_updatetime")
|
| | | private Date updatetime;
|
| | | |
| | | @Transient
|
| | | private Long totalSpecial;
|
| | | |
| | | @Transient // 系统关联列表
|
| | | private List<com.yeshi.fanli.entity.system.System> systemList;
|
| | | |
| | |
|
| | |
|
| | | public Long getId() {
|
| | |
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public List<com.yeshi.fanli.entity.system.System> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | public void setSystemList(List<com.yeshi.fanli.entity.system.System> systemList) {
|
| | | this.systemList = systemList;
|
| | | }
|
| | |
|
| | | public Long getTotalSpecial() {
|
| | | return totalSpecial;
|
| | | }
|
| | |
|
| | | public void setTotalSpecial(Long totalSpecial) {
|
| | | this.totalSpecial = totalSpecial;
|
| | | }
|
| | |
|
| | | public Integer getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(Integer state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.monitor;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | @Table("yeshi_ec_monitor_client_api")
|
| | | public class ClientAPIMonitor {
|
| | | @Column(name = "mca_id")
|
| | | private Long id;
|
| | | @Column(name = "mca_url")
|
| | | private String url;
|
| | | @Column(name = "mca_ip")
|
| | | private String ip;
|
| | | @Column(name = "mca_request_data")
|
| | | private String requestData;
|
| | | @Column(name = "mca_code")
|
| | | private Integer code;
|
| | | @Column(name = "mca_time")
|
| | | private Integer time;
|
| | | @Column(name = "mca_createtime")
|
| | | private Date createTime;
|
| | | @Column(name = "mca_beizhu")
|
| | | private String beiZhu;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | |
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | |
|
| | | public String getIp() {
|
| | | return ip;
|
| | | }
|
| | |
|
| | | public void setIp(String ip) {
|
| | | this.ip = ip;
|
| | | }
|
| | |
|
| | | public String getRequestData() {
|
| | | return requestData;
|
| | | }
|
| | |
|
| | | public void setRequestData(String requestData) {
|
| | | this.requestData = requestData;
|
| | | }
|
| | |
|
| | | public Integer getCode() {
|
| | | return code;
|
| | | }
|
| | |
|
| | | public void setCode(Integer code) {
|
| | | this.code = code;
|
| | | }
|
| | |
|
| | | public Integer getTime() {
|
| | | return time;
|
| | | }
|
| | |
|
| | | public void setTime(Integer time) {
|
| | | this.time = time;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public String getBeiZhu() {
|
| | | return beiZhu;
|
| | | }
|
| | |
|
| | | public void setBeiZhu(String beiZhu) {
|
| | | this.beiZhu = beiZhu;
|
| | | }
|
| | | }
|
| | |
| | | <!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.homemodule.SpecialCardMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.SpecialCard"> |
| | | <id column="cd_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="cd_name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="cd_card" property="card" jdbcType="VARCHAR"/> |
| | | <result column="cd_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="cd_createtime" property="createtime" jdbcType="TIMESTAMP"/> |
| | | <result column="cd_updatetime" property="updatetime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">cd_id,cd_name,cd_card,cd_createtime,cd_updatetime</sql> |
| | | <sql id="Base_Column_List">cd_id,cd_name,cd_card,cd_state,cd_createtime,cd_updatetime</sql> |
| | | |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_special_card where cd_id = #{id,jdbcType=BIGINT} |
| | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_special_card where cd_id = #{id,jdbcType=BIGINT}</delete> |
| | | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_card (cd_id,cd_name,cd_card,cd_createtime,cd_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{card,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_card (cd_id,cd_name,cd_card,cd_state,cd_createtime,cd_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{card,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_card |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">cd_id,</if> |
| | | <if test="name != null">cd_name,</if> |
| | | <if test="card != null">cd_card,</if> |
| | | <if test="state != null">cd_state,</if> |
| | | <if test="createtime != null">cd_createtime,</if> |
| | | <if test="updatetime != null">cd_updatetime,</if> |
| | | </trim>values |
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="card != null">#{card,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard">update yeshi_ec_special_card set cd_name = #{name,jdbcType=VARCHAR},cd_card = #{card,jdbcType=VARCHAR},cd_createtime = #{createtime,jdbcType=TIMESTAMP},cd_updatetime = #{updatetime,jdbcType=TIMESTAMP} where cd_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard">update yeshi_ec_special_card set cd_name = #{name,jdbcType=VARCHAR},cd_card = #{card,jdbcType=VARCHAR},cd_state = #{state,jdbcType=INTEGER},cd_createtime = #{createtime,jdbcType=TIMESTAMP},cd_updatetime = #{updatetime,jdbcType=TIMESTAMP} where cd_id = #{id,jdbcType=BIGINT}</update> |
| | | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard">update yeshi_ec_special_card |
| | | <set> |
| | | <if test="name != null">cd_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="card != null">cd_card=#{card,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">cd_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">cd_createtime=#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">cd_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </set> where cd_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="listQuery" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_special_card |
| | | WHERE 1=1 |
| | | <if test='key != null and key != ""'> |
| | | AND (cd_name like '%${key}%' OR cd_card like '%${key}%') |
| | | </if> |
| | | ORDER BY cd_createtime <if test='sort == 1'>DESC</if> |
| | | LIMIT ${start},${count} |
| | | </select> |
| | | |
| | | <select id="countlistQuery" resultType="java.lang.Long"> |
| | | SELECT IFNULL(count(cd_id),0) FROM yeshi_ec_special_card |
| | | WHERE 1=1 |
| | | <if test='key != null and key != ""'> |
| | | AND (cd_name like '%${key}%' OR cd_card like '%${key}%') |
| | | </if> |
| | | </select> |
| | | |
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List"> |
| | | delete from yeshi_ec_special_card WHERE cd_id in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | <!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.homemodule.SpecialMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.Special"> |
| | | <id column="b_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="b_name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="b_card" property="card" jdbcType="VARCHAR"/> |
| | | <result column="b_card_id" property="cardId" jdbcType="BIGINT"/> |
| | | <result column="b_main_picture" property="picture" jdbcType="VARCHAR"/> |
| | | <result column="b_sub_picture" property="subPicture" jdbcType="VARCHAR"/> |
| | | <result column="b_params" property="params" jdbcType="VARCHAR"/> |
| | | <result column="b_orderby" property="orderby" jdbcType="INTEGER"/> |
| | | <result column="b_state" property="state" jdbcType="BIGINT"/> |
| | | <result column="b_show_type" property="showType" jdbcType="VARCHAR"/> |
| | | <result column="b_remark" property="remark" jdbcType="VARCHAR"/> |
| | | <result column="b_createtime" property="createtime" jdbcType="TIMESTAMP"/> |
| | | <result column="b_updatetime" property="updatetime" jdbcType="TIMESTAMP"/> |
| | | |
| | | <association property="jumpDetail" column="b_jumpid" |
| | | select="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.selectByPrimaryKey"> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">b_id,b_name,b_card,b_main_picture,b_sub_picture,b_jumpid,b_params,b_orderby,b_createtime,b_updatetime</sql> |
| | | |
| | | <sql id="Base_Column_List">b_id,b_name,b_card,b_card_id,b_main_picture,b_sub_picture,b_jumpid,b_params,b_orderby,b_state,b_show_type,b_remark,b_createtime,b_updatetime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_special where b_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_special where b_id = #{id,jdbcType=BIGINT}</delete> |
| | | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special (b_id,b_name,b_card,b_main_picture,b_sub_picture,b_jumpid,b_params,b_orderby,b_createtime,b_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{card,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{subPicture,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special (b_id,b_name,b_card,b_card_id,b_main_picture,b_sub_picture,b_jumpid,b_params,b_orderby,b_state,b_show_type,b_remark,b_createtime,b_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{card,jdbcType=VARCHAR},#{cardId,jdbcType=BIGINT},#{picture,jdbcType=VARCHAR},#{subPicture,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{state,jdbcType=BIGINT},#{showType,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">b_id,</if> |
| | | <if test="name != null">b_name,</if> |
| | | <if test="card != null">b_card,</if> |
| | | <if test="cardId != null">b_card_id,</if> |
| | | <if test="picture != null">b_main_picture,</if> |
| | | <if test="subPicture != null">b_sub_picture,</if> |
| | | <if test="jumpDetail != null">b_jumpid,</if> |
| | | <if test="params != null">b_params,</if> |
| | | <if test="orderby != null">b_orderby,</if> |
| | | <if test="state != null">b_state,</if> |
| | | <if test="showType != null">b_show_type,</if> |
| | | <if test="remark != null">b_remark,</if> |
| | | <if test="createtime != null">b_createtime,</if> |
| | | <if test="updatetime != null">b_updatetime,</if> |
| | | </trim>values |
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="card != null">#{card,jdbcType=VARCHAR},</if> |
| | | <if test="cardId != null">#{cardId,jdbcType=BIGINT},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="subPicture != null">#{subPicture,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">#{params,jdbcType=VARCHAR},</if> |
| | | <if test="orderby != null">#{orderby,jdbcType=INTEGER},</if> |
| | | <if test="state != null">#{state,jdbcType=BIGINT},</if> |
| | | <if test="showType != null">#{showType,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special">update yeshi_ec_special set b_name = #{name,jdbcType=VARCHAR},b_card = #{card,jdbcType=VARCHAR},b_main_picture = #{picture,jdbcType=VARCHAR},b_sub_picture = #{subPicture,jdbcType=VARCHAR},b_jumpid = #{jumpDetail.id,jdbcType=BIGINT},b_params = #{params,jdbcType=VARCHAR},b_orderby = #{orderby,jdbcType=INTEGER},b_createtime = #{createtime,jdbcType=TIMESTAMP},b_updatetime = #{updatetime,jdbcType=TIMESTAMP} where b_id = #{id,jdbcType=BIGINT}</update> |
| | | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special">update yeshi_ec_special set b_name = #{name,jdbcType=VARCHAR},b_card = #{card,jdbcType=VARCHAR},b_card_id = #{cardId,jdbcType=BIGINT},b_main_picture = #{picture,jdbcType=VARCHAR},b_sub_picture = #{subPicture,jdbcType=VARCHAR},b_jumpid = #{jumpDetail.id,jdbcType=BIGINT},b_params = #{params,jdbcType=VARCHAR},b_orderby = #{orderby,jdbcType=INTEGER},b_state = #{state,jdbcType=BIGINT},b_show_type = #{showType,jdbcType=VARCHAR},b_remark = #{remark,jdbcType=VARCHAR},b_createtime = #{createtime,jdbcType=TIMESTAMP},b_updatetime = #{updatetime,jdbcType=TIMESTAMP} where b_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.Special">update yeshi_ec_special |
| | | <set> |
| | | <if test="name != null">b_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="card != null">b_card=#{card,jdbcType=VARCHAR},</if> |
| | | <if test="cardId != null">b_card_id=#{cardId,jdbcType=BIGINT},</if> |
| | | <if test="picture != null">b_main_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="subPicture != null">b_sub_picture=#{subPicture,jdbcType=VARCHAR},</if> |
| | | <if test="jumpDetail != null">b_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if> |
| | | <if test="params != null">b_params=#{params,jdbcType=VARCHAR},</if> |
| | | <if test="orderby != null">b_orderby=#{orderby,jdbcType=INTEGER},</if> |
| | | <if test="state != null">b_state=#{state,jdbcType=BIGINT},</if> |
| | | <if test="showType != null">b_show_type=#{showType,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">b_remark=#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="createtime != null">b_createtime=#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">b_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </set> where b_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List"> |
| | | delete from yeshi_ec_special WHERE b_id in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteBatchByCardID" parameterType="java.util.List"> |
| | | delete from yeshi_ec_special WHERE b_card_id in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </delete> |
| | | |
| | | <select id="queryByListPrimaryKey" parameterType="java.util.List" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_special |
| | | WHERE b_id in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </select> |
| | | |
| | | <select id="queryByListCardID" parameterType="java.util.List" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_special |
| | | WHERE b_card_id in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </select> |
| | | |
| | | <select id="listQueryByCard" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM `yeshi_ec_special` pp |
| | | WHERE pp.`b_card_id` = #{cardId} |
| | | <if test='key != null and key != ""'> |
| | | AND b_name like '%${key}%' |
| | | </if> |
| | | ORDER BY pp.b_orderby |
| | | LIMIT ${start},${count} |
| | | </select> |
| | | |
| | | <select id="countlistQueryByCard" resultType="java.lang.Long"> |
| | | SELECT IFNULL(count(b_id),0) FROM `yeshi_ec_special` pp |
| | | WHERE pp.`b_card_id` = #{cardId} |
| | | <if test='key != null and key != ""'> |
| | | AND b_name like '%${key}%' |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getMaxOrderByCard" resultType="java.lang.Integer"> |
| | | SELECT IFNULL(MAX(pp.b_orderby),0) FROM yeshi_ec_special pp |
| | | WHERE pp.`b_card_id` = #{cardId} |
| | | </select> |
| | | |
| | | <select id="getOrderByCardID" resultMap="BaseResultMap"> |
| | | SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_special |
| | | WHERE b_card_id = #{cardId} |
| | | <if test="type == -1"> |
| | | <![CDATA[and b_orderby < #{order}]]> |
| | | order by b_orderby desc |
| | | </if> |
| | | |
| | | <if test="type == 1"> |
| | | <![CDATA[and b_orderby > #{order} ]]> |
| | | order by b_orderby |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="listBySystemAndCard" resultMap="BaseResultMap"> |
| | | SELECT p.* FROM `yeshi_ec_special` p LEFT JOIN `yeshi_ec_special_card` c ON p.`b_card_id` = c.`cd_id` |
| | | LEFT JOIN `yeshi_ec_super_special_card` s ON s.`sp_special_cid` = c.`cd_id` |
| | | WHERE p.`b_state` = 0 AND c.`cd_state` = 0 |
| | | AND c.`cd_card` = #{card} AND s.`sp_system_id` = #{systemId} |
| | | ORDER BY p.`b_orderby` |
| | | </select> |
| | | |
| | | </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.monitor.ClientAPIMonitorMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.monitor.ClientAPIMonitor"> |
| | | <id column="mca_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="mca_url" property="url" jdbcType="VARCHAR" /> |
| | | <result column="mca_ip" property="ip" jdbcType="VARCHAR" /> |
| | | <result column="mca_request_data" property="requestData" |
| | | jdbcType="VARCHAR" /> |
| | | |
| | | <result column="mca_code" property="code" jdbcType="INTEGER" /> |
| | | <result column="mca_time" property="time" jdbcType="INTEGER" /> |
| | | <result column="mca_createtime" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mca_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mca_id,mca_url,mca_ip,mca_request_data,mca_code,mca_time,mca_createtime,mca_beizhu |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_monitor_client_api where mca_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_monitor_client_api where mca_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.monitor.ClientAPIMonitor" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_monitor_client_api |
| | | (mca_id,mca_url,mca_ip,mca_request_data,mca_code,mca_time,mca_createtime,mca_beizhu) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{ip,jdbcType=VARCHAR},#{requestData,jdbcType=VARCHAR},#{code,jdbcType=INTEGER},#{time,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{beiZhu,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.monitor.ClientAPIMonitor" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_monitor_client_api |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">mca_id,</if> |
| | | <if test="url != null">mca_url,</if> |
| | | <if test="ip != null">mca_ip,</if> |
| | | <if test="requestData != null">mca_request_data,</if> |
| | | <if test="code != null">mca_code,</if> |
| | | <if test="time != null">mca_time,</if> |
| | | <if test="createTime != null">mca_createtime,</if> |
| | | <if test="beiZhu != null">mca_beizhu,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="url != null">#{url,jdbcType=VARCHAR},</if> |
| | | <if test="ip != null">#{ip,jdbcType=VARCHAR},</if> |
| | | <if test="requestData != null">#{requestData,jdbcType=VARCHAR},</if> |
| | | <if test="code != null">#{code,jdbcType=INTEGER},</if> |
| | | <if test="time != null">#{time,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.monitor.ClientAPIMonitor">update |
| | | yeshi_ec_monitor_client_api set mca_url = |
| | | #{url,jdbcType=VARCHAR},mca_ip = |
| | | #{ip,jdbcType=VARCHAR},mca_request_data = |
| | | #{requestData,jdbcType=VARCHAR},mca_code = |
| | | #{code,jdbcType=INTEGER},mca_time = |
| | | #{time,jdbcType=INTEGER},mca_createtime = |
| | | #{createTime,jdbcType=TIMESTAMP},mca_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR} where mca_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.monitor.ClientAPIMonitor"> |
| | | update yeshi_ec_monitor_client_api |
| | | <set> |
| | | <if test="url != null">mca_url=#{url,jdbcType=VARCHAR},</if> |
| | | <if test="ip != null">mca_ip=#{ip,jdbcType=VARCHAR},</if> |
| | | <if test="requestData != null">mca_request_data=#{requestData,jdbcType=VARCHAR},</if> |
| | | <if test="code != null">mca_code=#{code,jdbcType=INTEGER},</if> |
| | | <if test="time != null">mca_time=#{time,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">mca_createtime=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="beiZhu != null">mca_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | </set> |
| | | where mca_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.yeshi.fanli.service.impl.homemodule;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.SpecialCardMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.SuperSpecialCardMapper;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialCardService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | |
|
| | | @Service
|
| | |
| | | @Resource
|
| | | private SpecialCardMapper specialCardMapper;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | |
| | | @Resource
|
| | | private SpecialService specialService;
|
| | | |
| | | @Resource
|
| | | private SuperSpecialCardMapper superSpecialCardMapper;
|
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) {
|
| | |
| | | return specialCardMapper.updateByPrimaryKey(record);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception{
|
| | | |
| | | specialService.deleteBatchByCardID(list);
|
| | | superSpecialCardMapper.deleteBatchByCardId(list);
|
| | | |
| | | return specialCardMapper.deleteBatchByPrimaryKey(list);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<SpecialCard> listQuery(long start, int count, String key, Integer sort) {
|
| | | |
| | | List<SpecialCard> listObj = specialCardMapper.listQuery(start, count, key, sort);
|
| | | if (listObj == null || listObj.size() == 0) {
|
| | | return null;
|
| | | }
|
| | | |
| | | List<System> systemList = systemService.getSystems();
|
| | | |
| | | List<Long> listCardId = new ArrayList<Long>();
|
| | | for (SpecialCard specialCard: listObj) {
|
| | | listCardId.add(specialCard.getId());
|
| | | }
|
| | | |
| | | List<SuperSpecialCard> listSuper = superSpecialCardMapper.listByCardIDs(listCardId);
|
| | | |
| | | if (listSuper == null || listSuper.size() == 0) {
|
| | | |
| | | for (SpecialCard specialCard: listObj) {
|
| | | specialCard.setSystemList(systemList);
|
| | | }
|
| | | |
| | | } else {
|
| | | for (SpecialCard specialCard: listObj) {
|
| | | |
| | | Long id = specialCard.getId();
|
| | | |
| | | List<System> newList = new ArrayList<System>();
|
| | | // 是否有关联系统选项
|
| | | for (System dsystem : systemList) {
|
| | | |
| | | System newsystem = new System();
|
| | | |
| | | try {
|
| | | PropertyUtils.copyProperties(newsystem, dsystem);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | |
| | | |
| | | if (listSuper != null && listSuper.size() > 0) {
|
| | | |
| | | Long systemId = newsystem.getId();
|
| | | |
| | | for (SuperSpecialCard superSpecialCard : listSuper) {
|
| | | SpecialCard special = superSpecialCard.getSpecialCard();
|
| | | System system = superSpecialCard.getSystem();
|
| | | |
| | | // 当前专题 、当前系统
|
| | | if (special != null && system != null && id == special.getId() |
| | | && systemId == system.getId()) {
|
| | | newsystem.setCheck(1);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | if (newsystem.getCheck() != 1) {
|
| | | newsystem.setCheck(0);
|
| | | }
|
| | | |
| | | newList.add(newsystem);
|
| | | }
|
| | | |
| | | specialCard.setSystemList(newList);
|
| | | }
|
| | | }
|
| | | |
| | | return listObj;
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countlistQuery(String key) {
|
| | | return specialCardMapper.countlistQuery(key);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.homemodule;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import java.io.InputStream;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.SpecialMapper;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | |
|
| | | @Service
|
| | |
| | | public int updateByPrimaryKey(Special record) {
|
| | | return specialMapper.updateByPrimaryKey(record);
|
| | | }
|
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception{
|
| | | |
| | | List<Special> listSpecial = specialMapper.queryByListPrimaryKey(list);
|
| | | for (Special special: listSpecial) {
|
| | | String src = special.getPicture();
|
| | | if (!StringUtil.isNullOrEmpty(src)) {
|
| | | COSManager.getInstance().deleteFile(src);
|
| | | }
|
| | | }
|
| | | |
| | | return specialMapper.deleteBatchByPrimaryKey(list);
|
| | | }
|
| | | |
| | | @Override
|
| | | public int deleteBatchByCardID(List<Long> list) throws Exception{
|
| | | List<Special> listSpecial = specialMapper.queryByListCardID(list);
|
| | | for (Special special: listSpecial) {
|
| | | String src = special.getPicture();
|
| | | if (!StringUtil.isNullOrEmpty(src)) {
|
| | | COSManager.getInstance().deleteFile(src);
|
| | | }
|
| | | }
|
| | | |
| | | return specialMapper.deleteBatchByCardID(list);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<Special> listQueryByCard(long start, int count, Long card, String key){
|
| | | return specialMapper.listQueryByCard(start, count, card, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countlistQueryByCard(Long card, String key) {
|
| | | return specialMapper.countlistQueryByCard(card, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<Special> getOrderByCardID(Long cardId, Integer type, Integer order) {
|
| | | return specialMapper.getOrderByCardID(cardId, type, order);
|
| | | }
|
| | | |
| | | @Override
|
| | | public int getMaxOrderByCard(Long card) {
|
| | | return specialMapper.getMaxOrderByCard(card);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "configCache", key = "'listBySystemAndCard-'+#card+'-'+#systemId")
|
| | | public List<Special> listBySystemAndCard( String card, Long systemId) {
|
| | | return specialMapper.listBySystemAndCard(card, systemId);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void uploadPicture(MultipartFile file, Special record, Long cardId) throws Exception {
|
| | | |
| | | InputStream inputStream = file.getInputStream();
|
| | | String contentType = file.getContentType();
|
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | | // 上传文件相对位置
|
| | | String fileUrl="SpecialPic/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | |
| | | /* 修改图片时,先删除已存在图片 */
|
| | | if (record != null) { |
| | | String src = record.getPicture();
|
| | | if (!StringUtil.isNullOrEmpty(src)) {
|
| | | COSManager.getInstance().deleteFile(src);
|
| | | }
|
| | | }
|
| | | |
| | | String uploadFilePath = COSManager.getInstance().uploadFile(inputStream, fileUrl).getUrl();
|
| | | |
| | | /* 更新数据库信息 */
|
| | | if (!StringUtil.isNullOrEmpty(uploadFilePath)) {
|
| | | |
| | | if (record != null) {
|
| | | record.setUpdatetime(new Date());
|
| | | record.setPicture(uploadFilePath);
|
| | | updateByPrimaryKeySelective(record);
|
| | | } else {
|
| | | record = new Special();
|
| | | record.setPicture(uploadFilePath);
|
| | | record.setCreatetime(new Date());
|
| | | record.setUpdatetime(new Date());
|
| | | record.setCardId(cardId);
|
| | | record.setState(0L);
|
| | | |
| | | int maxOrder = getMaxOrderByCard(cardId);
|
| | | record.setOrderby(maxOrder + 1);
|
| | | record.setShowType("default");
|
| | | insertSelective(record);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "bannerCache", key = "'getByBannerCard-'+#card")
|
| | | public List<SwiperPicture> getByBannerCard(String card) throws SwiperPictureException {
|
| | | return swiperPictureMapper.getByBannerCard(card);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.monitor;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.monitor.ClientAPIMonitorMapper;
|
| | | import com.yeshi.fanli.entity.monitor.ClientAPIMonitor;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | |
|
| | | @Service
|
| | | public class MonitorServiceImpl implements MonitorService {
|
| | |
|
| | | @Resource
|
| | | private ClientAPIMonitorMapper clientAPIMonitorMapper;
|
| | |
|
| | | @Async
|
| | | @Override
|
| | | public void addClientAPIMonitor(ClientAPIMonitor monitor) {
|
| | | clientAPIMonitorMapper.insertSelective(monitor);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.homemodule;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | public int updateByPrimaryKey(SpecialCard record);
|
| | |
|
| | | public List<SpecialCard> listQuery(long start, int count, String key, Integer sort);
|
| | |
|
| | | public long countlistQuery(String key);
|
| | |
|
| | | /**
|
| | | * 根据id批量删除
|
| | | * @param list
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception;
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.homemodule;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | public int updateByPrimaryKey(Special record);
|
| | |
|
| | | public List<Special> listQueryByCard(long start, int count, Long card, String key);
|
| | |
|
| | | public long countlistQueryByCard(Long card, String key);
|
| | |
|
| | | /**
|
| | | * 查询排序值
|
| | | * @param card
|
| | | * @return
|
| | | */
|
| | | public int getMaxOrderByCard(Long card);
|
| | |
|
| | | /**
|
| | | * 专题图片上传
|
| | | * @param file
|
| | | * @param record
|
| | | * @throws Exception
|
| | | */
|
| | | public void uploadPicture(MultipartFile file, Special record, Long cardId) throws Exception;
|
| | |
|
| | | /**
|
| | | * 根据id批量删除
|
| | | * @param list
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception;
|
| | |
|
| | | /**
|
| | | * CardID批量删除
|
| | | * @param list
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteBatchByCardID(List<Long> list) throws Exception;
|
| | |
|
| | | /**
|
| | | * 排序交换对象查询
|
| | | * @param cardId
|
| | | * @param type
|
| | | * @param order
|
| | | * @return
|
| | | */
|
| | | public List<Special> getOrderByCardID(Long cardId, Integer type, Integer order);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据标识、系统查询启用专题
|
| | | * @param card
|
| | | * @param systemId
|
| | | * @return
|
| | | */
|
| | | public List<Special> listBySystemAndCard(String card, Long systemId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.monitor;
|
| | |
|
| | | import com.yeshi.fanli.entity.monitor.ClientAPIMonitor;
|
| | |
|
| | | /**
|
| | | * 监控服务
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface MonitorService {
|
| | |
|
| | | /**
|
| | | * 添加客户端API的监控
|
| | | * |
| | | * @param monitor
|
| | | */
|
| | | public void addClientAPIMonitor(ClientAPIMonitor monitor);
|
| | |
|
| | | }
|
| | |
| | | public static boolean IS_TASK = false;
|
| | |
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = true;
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = false;
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
|
New file |
| | |
| | | package com.yeshi.fanli.util.factory;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.Iterator;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.monitor.ClientAPIMonitor;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class MonitorFactory {
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public static ClientAPIMonitor createClientAPI(HttpServletRequest request, int code, int time, String beiZhu)
|
| | | throws Exception {
|
| | | if (request == null)
|
| | | throw new Exception("request 为空");
|
| | | ClientAPIMonitor monitor = new ClientAPIMonitor();
|
| | | Map<String, Object> params = (Map<String, Object>) request.getParameterMap();
|
| | | if (params != null) {
|
| | | Iterator<String> its = params.keySet().iterator();
|
| | | JSONObject json = new JSONObject();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | if ("packages".equalsIgnoreCase(key) || "appkey".equalsIgnoreCase(key)
|
| | | || "platform".equalsIgnoreCase(key) || "apiversion".equalsIgnoreCase(key)
|
| | | || "channel".equalsIgnoreCase(key) || "imei".equalsIgnoreCase(key)
|
| | | || "osVersion".equalsIgnoreCase(key) || "network".equalsIgnoreCase(key)
|
| | | || "deviceType".equalsIgnoreCase(key) || "time".equalsIgnoreCase(key)
|
| | | || "sign".equalsIgnoreCase(key))
|
| | | continue;
|
| | | json.put(key, ((Object[]) params.get(key))[0]);
|
| | | }
|
| | | monitor.setRequestData(json.toString());
|
| | | }
|
| | | monitor.setBeiZhu(beiZhu);
|
| | | monitor.setCode(code);
|
| | | monitor.setCreateTime(new Date());
|
| | | monitor.setIp(request.getRemoteHost());
|
| | | monitor.setTime(time);
|
| | | monitor.setUrl(request.getRequestURI());
|
| | | return monitor;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | #druid.username=root
|
| | | #druid.password=hexiaohui
|
| | |
|
| | | #外网正式
|
| | | druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan
|
| | |
|
| | | druid.url=jdbc:mysql://192.168.1.253:3306/ec_quan
|
| | | druid.username=root
|
| | | druid.password=Yeshi2016@
|
| | | druid.password=123456
|
| | |
|
| | |
|
| | | #druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test
|
| | | #druid.username=root
|
| | | #druid.password=Yeshi2016@
|
| | |
|
| | |
|
| | | #druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test_online
|
| | | #druid.username=root
|
| | | #druid.password=Yeshi2016@
|
| | |
|
| | |
|
| | |
|
| | | #外网正式
|
| | | #druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan
|
| | | #druid.username=root
|
| | | #druid.password=Yeshi2016@
|
| | |
|
| | | #外网本地测试
|
| | | #druid.url=jdbc:mysql://gz-cdb-r13d0yi9.sql.tencentcdb.com:62929/ec_quan
|
| | |
| | | import org.junit.Test;
|
| | | import org.yeshi.utils.mybatis.MyBatisMapperUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | |
|
| | | @Ignore
|
| | | public class MyBatisTest {
|
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | MyBatisMapperUtil.createMapper(AppVersionInfo.class);
|
| | | MyBatisMapperUtil.createMapper(SuperSpecialCard.class);
|
| | | }
|
| | |
|
| | | }
|