Merge branch 'master' of
ssh://admin@193.112.35.168:29418/fanli-server.git
Conflicts:
fanli/src/test/java/org/fanli/MyBatisTest.java
1个文件已删除
16个文件已修改
10个文件已添加
| | |
| | | /target/
|
| | | /.settings/
|
| | | druid.properties
|
| | | Constant.java |
| | | Constant.java |
| | | /error.log |
| | | /.gitignore |
| | | /c3p0/ |
| | | /logs/ |
New file |
| | |
| | | package com.yeshi.fanli.controller.admin.homemodule;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestParam;
|
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | 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.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.SystemConfigService;
|
| | | 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.service.inter.homemodule.SuperSpecialCardService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/specialcard")
|
| | | public class SpecialCardAdminController {
|
| | |
|
| | | @Resource
|
| | | private SpecialService specialService;
|
| | | |
| | | @Resource
|
| | | private SpecialCardService specialCardService;
|
| | | |
| | | @Resource
|
| | | private SuperSpecialCardService superSpecialCardService;
|
| | | |
| | | @Resource
|
| | | private SystemConfigService systemConfigService;
|
| | | |
| | | @Resource
|
| | | private JumpDetailV2Service jumpDetailV2Service;
|
| | | |
| | | @Resource
|
| | | private AdminUserService adminUserService;
|
| | | |
| | | @Resource
|
| | | private SystemService systemService;
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 新增
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveAdd")
|
| | | public void saveAdd(String callback, SpecialCard specialCard, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | |
| | | String name = specialCard.getName();
|
| | | String card = specialCard.getCard();
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(name) || StringUtil.isNullOrEmpty(card)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("专题信息与标识不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Date nowTime = new Date();
|
| | | specialCard.setState(1); // 默认停用
|
| | | specialCard.setCreatetime(nowTime);
|
| | | specialCard.setUpdatetime(nowTime);
|
| | | specialCardService.insert(specialCard);
|
| | | |
| | | List<System> systemList = systemService.getSystems();
|
| | | if (systemList != null && systemList.size() > 0) {
|
| | | for (System system: systemList) {
|
| | | SuperSpecialCard superCard = new SuperSpecialCard();
|
| | | superCard.setSpecialCard(specialCard);
|
| | | superCard.setSystem(system);
|
| | | superSpecialCardService.insertSelective(superCard);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, SpecialCard specialCard, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | Long id = specialCard.getId();
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | SpecialCard resultObj = specialCardService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | | String name = specialCard.getName();
|
| | | String card = specialCard.getCard();
|
| | | if (StringUtil.isNullOrEmpty(name) && StringUtil.isNullOrEmpty(card)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("修改内容不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | specialCard.setName(null);
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(card)) {
|
| | | specialCard.setCard(null);
|
| | | }
|
| | | |
| | | specialCard.setUpdatetime(new Date());
|
| | | specialCardService.updateByPrimaryKeySelective(specialCard);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 修该状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateState")
|
| | | public void updateState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | SpecialCard resultObj = specialCardService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state.equals(1) || state == 1) {
|
| | | resultObj.setState(0);
|
| | | } else {
|
| | | resultObj.setState(1);
|
| | | }
|
| | |
|
| | | specialCardService.updateByPrimaryKeySelective(resultObj);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", resultObj.getState());
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 修改系统状态
|
| | | * @param callback
|
| | | * @param type
|
| | | * @param cardId
|
| | | * @param systemId
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveSystemState")
|
| | | public void saveSystemState(String callback, Long cardId, Long systemId, PrintWriter out) {
|
| | | |
| | | if (cardId == null || systemId == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递参数不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | List<SuperSpecialCard> list = superSpecialCardService.querybyCardIdAndSystemId(cardId, systemId);
|
| | | |
| | | if (list != null && list.size() > 0) {
|
| | | superSpecialCardService.deletebyCardIdAndSystemId(cardId, systemId);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("check", 0);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } else {
|
| | | |
| | | SpecialCard specialCard = new SpecialCard();
|
| | | specialCard.setId(cardId);
|
| | | |
| | | System system = new System();
|
| | | system.setId(systemId);
|
| | | |
| | | SuperSpecialCard superCard = new SuperSpecialCard();
|
| | | superCard.setSpecialCard(specialCard);
|
| | | superCard.setSystem(system);
|
| | | |
| | | superSpecialCardService.insertSelective(superCard);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("check", 1);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("修改失败"));
|
| | | }
|
| | | |
| | | }
|
| | | |
| | |
|
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | Integer sort, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | if (pageSize == null || pageSize < 1) {
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | | }
|
| | |
|
| | | try {
|
| | | List<SpecialCard> list = specialCardService.listQuery((pageIndex - 1) * pageSize, |
| | | pageSize, key, sort);
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | for (SpecialCard specialCard: list) {
|
| | | long totalSpecial= specialService.countlistQueryByCard(specialCard.getId(), null);
|
| | | specialCard.setTotalSpecial(totalSpecial);
|
| | | }
|
| | |
|
| | | long count = specialCardService.countlistQuery(key);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); |
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | int count = specialCardService.deleteBatchByPrimaryKey(list);
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除["+ count +"]条数据"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 查询专题
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param bannerId |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "querySpecial")
|
| | | public void querySpecial(String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | Long cardId, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | if (pageSize == null || pageSize < 1) {
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | | }
|
| | |
|
| | | if (cardId == null) {
|
| | | out.print(JsonUtil.loadFalseResult("唯一标识ID不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | |
| | | List<Special> list = specialService.listQueryByCard((pageIndex - 1) * pageSize, |
| | | pageSize, cardId, key);
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | // 跳转链接
|
| | | for (Special special: list) {
|
| | | String params = special.getParams();
|
| | | if (!StringUtil.isNullOrEmpty(params)) {
|
| | | JSONObject jsonData = JSONObject.fromObject(params);
|
| | | if (jsonData.get("url") != null){
|
| | | special.setParams(jsonData.get("url").toString());
|
| | | } else {
|
| | | special.setParams(null);
|
| | | }
|
| | | }
|
| | | |
| | | JumpDetailV2 jumpDetail = special.getJumpDetail();
|
| | | if (jumpDetail == null) {
|
| | | // 默认未选择
|
| | | JumpDetailV2 jumpDetailV2 = new JumpDetailV2();
|
| | | jumpDetailV2.setName("-未选择-");
|
| | | jumpDetailV2.setType("default");
|
| | | special.setJumpDetail(jumpDetailV2);
|
| | | }
|
| | | }
|
| | | |
| | | long count = specialService.countlistQueryByCard(cardId, key);
|
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); |
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(list));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 修改专题信息
|
| | | * @param callback
|
| | | * @param record
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "modifySpecial")
|
| | | public void modifySpecial(String callback, Special record, String jumpType, PrintWriter out) {
|
| | | |
| | | Long id = record.getId();
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | |
| | | Special resultObj = specialService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | String params = record.getParams();
|
| | | if (!StringUtil.isNullOrEmpty(params)) {
|
| | | |
| | | String jumpValue = systemConfigService.get("jump");
|
| | | if (StringUtil.isNullOrEmpty(jumpValue)) {
|
| | | jumpValue = "{\"url\":\"#\"}";
|
| | | }
|
| | | |
| | | params = jumpValue.replace("#", params);
|
| | | record.setParams(params);
|
| | | }
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(jumpType)) {
|
| | | List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
|
| | | if (listByType !=null && listByType.size() > 0) {
|
| | | record.setJumpDetail(listByType.get(0));
|
| | | } |
| | | }
|
| | | |
| | | specialService.updateByPrimaryKeySelective(record);
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | |
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 专题图片上传
|
| | | * @param file
|
| | | * @param uid
|
| | | * @param id
|
| | | * @param request
|
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveSpecial")
|
| | | public void saveSpecial(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | Long id, Long cardId, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | |
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | Special resultObj = null;
|
| | | if (id != null) {
|
| | | resultObj = specialService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | out.print(JsonUtil.loadFalseResult("该专题已不存在"));
|
| | | return;
|
| | | }
|
| | | }
|
| | | |
| | | specialService.uploadPicture(file, resultObj, cardId);
|
| | | out.print(JsonUtil.loadTrueResult("上传成功"));
|
| | | |
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 删除专题
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteSpecial")
|
| | | public void deleteSpecial(String callback, String idArray, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | int count = specialService.deleteBatchByPrimaryKey(list);
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除["+ count +"]条数据"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | /**
|
| | | * 修该状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateSpecialState")
|
| | | public void updateSpecialState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Special resultObj = specialService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | Long state = resultObj.getState();
|
| | | if (state == null || state.equals(1) || state == 1) {
|
| | | resultObj.setState(0L);
|
| | | } else {
|
| | | resultObj.setState(1L);
|
| | | }
|
| | |
|
| | | specialService.updateByPrimaryKeySelective(resultObj);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", resultObj.getState());
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 修改排序
|
| | | * |
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveSpecialOrder")
|
| | | public void saveSpecialOrder(String callback, Long id,Integer moveType, PrintWriter out) {
|
| | | |
| | | if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1))) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递的类型不正确"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | |
|
| | | Special resultObj = specialService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | Long cid = resultObj.getCardId();
|
| | | Integer oldOrder = resultObj.getOrderby();
|
| | | List<Special> list = specialService.getOrderByCardID(cid, moveType, oldOrder);
|
| | | |
| | | if (list != null && list.size() > 0) {
|
| | | Special changeObj = list.get(0);
|
| | | // 交换排序序号
|
| | | resultObj.setOrderby(changeObj.getOrderby());
|
| | | |
| | | changeObj.setOrderby(oldOrder);
|
| | | |
| | | specialService.updateByPrimaryKeySelective(changeObj);
|
| | | }
|
| | | |
| | | specialService.updateByPrimaryKeySelective(resultObj);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|
| | |
| | | }
|
| | |
|
| | | 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 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;
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecial;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.bus.recommend.Honest;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendBanner;
|
| | |
| | | import com.yeshi.fanli.service.inter.goods.SuperRecommendSpecialService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoCouponService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SuperSpecialService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | |
| | |
|
| | | @Resource
|
| | | private ShamUserService shamUserService;
|
| | | |
| | | @Resource
|
| | | private SpecialService specialService;
|
| | | |
| | | @Resource
|
| | | private SwiperPictureService swiperPictureService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | |
| | | */
|
| | | @RequestMapping(value = "getRecommendInfo")
|
| | | public void getRecommendHomeInfo(AcceptData acceptData, PrintWriter out) {
|
| | |
|
| | | |
| | | System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "系统不存在"));
|
| | |
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 新版推荐专题管理(1.4.0)
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getNewRecommendInfo")
|
| | | public void getNewRecommendInfo(AcceptData acceptData, String specialCard, String swiperCard, PrintWriter out) {
|
| | |
|
| | | System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "系统不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | List<SwiperPicture> listswiper = null;
|
| | | if (!StringUtil.isNullOrEmpty(specialCard)) {
|
| | | try {
|
| | | |
| | | listswiper = swiperPictureService.getByBannerCard(swiperCard);
|
| | | |
| | | if (listswiper != null && listswiper.size() > 0) {
|
| | | for (SwiperPicture swiperPicture: listswiper) {
|
| | | swiperPicture.setBannerId(null);
|
| | | swiperPicture.setCreatetime(null);
|
| | | swiperPicture.setUpdatetime(null);
|
| | | swiperPicture.setState(null);
|
| | | swiperPicture.setRemark(null);
|
| | | }
|
| | | }
|
| | | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | Special miaoShaSpecial = null;
|
| | | List<Special> honestList = new ArrayList<Special>();
|
| | | List<Special> specialList = new ArrayList<Special>();
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(specialCard)) {
|
| | | try {
|
| | | List<Special> listSpecial = specialService.listBySystemAndCard(specialCard, system.getId());
|
| | | |
| | | if (listSpecial != null && listSpecial.size() > 0) {
|
| | | for (Special special: listSpecial) {
|
| | | special.setCreatetime(null);
|
| | | special.setUpdatetime(null);
|
| | | special.setState(null);
|
| | | special.setRemark(null);
|
| | | special.setCard(null);
|
| | | special.setCardId(null);
|
| | | |
| | | if ("限时秒杀".equals(special.getName())) {
|
| | | miaoShaSpecial = special;
|
| | | continue;
|
| | | }
|
| | | |
| | | if ("arc".equals(special.getShowType())) {
|
| | | // 同一行专题
|
| | | honestList.add(special);
|
| | | } else {
|
| | | // 其他专题
|
| | | specialList.add(special);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | /* 限时秒杀 - 时间处理 */
|
| | | JSONObject msJSON = JSONObject.fromObject(new Gson().toJson(miaoShaSpecial));
|
| | | if (miaoShaSpecial != null) {
|
| | | // 获取秒杀
|
| | | int[] hours = new int[] { 0, 9, 12, 14, 16, 20, 22 };
|
| | | int hour = -1;
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(Long.parseLong(acceptData.getTime()));
|
| | | int nowHour = calendar.get(Calendar.HOUR_OF_DAY);
|
| | | for (int i = 0; i < hours.length - 1; i++) {
|
| | | if (nowHour >= hours[i] && nowHour < hours[i + 1]) {
|
| | | hour = hours[i + 1];
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | if (hour < 0)
|
| | | hour = 24;
|
| | | long time = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(calendar.getTimeInMillis(), "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd") + 1000 * 60 * 60 * hour;
|
| | | msJSON.put("time", time);
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("banner", listswiper);
|
| | | root.put("honest", honestList);
|
| | | root.put("special", specialList);
|
| | | root.put("miaoSha", msJSON);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | |
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 商品基本详情 (1.4.0)
|
| | | *
|
| | |
| | | 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.homemodule; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard; |
| | | |
| | | public interface SuperSpecialCardMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SuperSpecialCard record); |
| | | |
| | | int insertSelective(SuperSpecialCard record); |
| | | |
| | | SuperSpecialCard selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(SuperSpecialCard record); |
| | | |
| | | int updateByPrimaryKey(SuperSpecialCard record); |
| | | |
| | | List<SuperSpecialCard> listByCardIDs(List<Long> list); |
| | | |
| | | int deleteBatchByCardId(List<Long> list); |
| | | |
| | | void deletebyCardIdAndSystemId(@Param("cardId") Long cardId, @Param("systemId") Long systemId); |
| | | |
| | | List<SuperSpecialCard> querybyCardIdAndSystemId(@Param("cardId") Long cardId, @Param("systemId") Long systemId); |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.bus;
|
| | |
|
| | | public enum GoodsSourceTypeEnum {
|
| | | tb("淘宝"), jd("京东");
|
| | | private final String desc;
|
| | |
|
| | | private GoodsSourceTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | }
|
| | |
| | | @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.bus.homemodule;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | |
|
| | | /**
|
| | | * 专题对应启用系统
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年11月08日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_special_card")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_super_special_card")
|
| | | public class SuperSpecialCard implements Serializable {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @Column(name = "sp_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "sp_id")
|
| | | private Long id;
|
| | |
|
| | | // 专题管理
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sp_special_cid")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sp_special_cid")
|
| | | private SpecialCard specialCard;
|
| | |
|
| | | // 系统
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sp_system_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sp_system_id")
|
| | | private System system;
|
| | | |
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public SpecialCard getSpecialCard() {
|
| | | return specialCard;
|
| | | }
|
| | |
|
| | | public void setSpecialCard(SpecialCard specialCard) {
|
| | | this.specialCard = specialCard;
|
| | | }
|
| | |
|
| | | public System getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(System system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.bus.msg.content;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.HongBao;
|
| | |
|
| | | /**
|
| | | * 奖金到账,返利到账消息和红包的映射
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class MsgMoneyHongBaoMap {
|
| | | private Long id;
|
| | | private HongBao hongBao;
|
| | | private MsgTypeMoney msgTypeMoney;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public HongBao getHongBao() {
|
| | | return hongBao;
|
| | | }
|
| | |
|
| | | public void setHongBao(HongBao hongBao) {
|
| | | this.hongBao = hongBao;
|
| | | }
|
| | |
|
| | | public MsgTypeMoney getMsgTypeMoney() {
|
| | | return msgTypeMoney;
|
| | | }
|
| | |
|
| | | public void setMsgTypeMoney(MsgTypeMoney msgTypeMoney) {
|
| | | this.msgTypeMoney = msgTypeMoney;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.bus.msg.content;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | /***
|
| | | * 邀请消息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class MsgTypeInvite {
|
| | | public enum MsgTypeInviteEnumType {
|
| | | invite("邀请消息"), welcome("新人欢迎");
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeInviteEnumType(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | }
|
| | |
|
| | | private Long id;
|
| | | private UserInfo user;
|
| | | private MsgTypeInviteEnumType msgType;// 消息类型
|
| | | private String welcomeContent;// 欢迎用语
|
| | | private ThreeSale inviteUser;// 邀请信息
|
| | | private String desc;// 说明
|
| | | private String beiZhu;// 备注
|
| | | private Boolean read;// 是否已读
|
| | | private Date createTime;
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public UserInfo getUser() {
|
| | | return user;
|
| | | }
|
| | |
|
| | | public void setUser(UserInfo user) {
|
| | | this.user = user;
|
| | | }
|
| | |
|
| | | public MsgTypeInviteEnumType getMsgType() {
|
| | | return msgType;
|
| | | }
|
| | |
|
| | |
|
| | | public void setMsgType(MsgTypeInviteEnumType msgType) {
|
| | | this.msgType = msgType;
|
| | | }
|
| | |
|
| | | public String getWelcomeContent() {
|
| | | return welcomeContent;
|
| | | }
|
| | |
|
| | | public void setWelcomeContent(String welcomeContent) {
|
| | | this.welcomeContent = welcomeContent;
|
| | | }
|
| | |
|
| | | public ThreeSale getInviteUser() {
|
| | | return inviteUser;
|
| | | }
|
| | |
|
| | | public void setInviteUser(ThreeSale inviteUser) {
|
| | | this.inviteUser = inviteUser;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | |
|
| | | public void setDesc(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getBeiZhu() {
|
| | | return beiZhu;
|
| | | }
|
| | |
|
| | | public void setBeiZhu(String beiZhu) {
|
| | | this.beiZhu = beiZhu;
|
| | | }
|
| | |
|
| | | public Boolean getRead() {
|
| | | return read;
|
| | | }
|
| | |
|
| | | public void setRead(Boolean read) {
|
| | | this.read = read;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.bus.msg.content;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.GoodsSourceTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | /**
|
| | | * 奖金到账记录
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class MsgTypeMoney {
|
| | | public enum MsgTypeMoneyEnumType {
|
| | | extract("提现"), shareMoney("奖金到账"), fanLiMoney("返利到账");
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeMoneyEnumType(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | }
|
| | |
|
| | | private Long id;
|
| | | private UserInfo user;
|
| | | private MsgTypeMoneyEnumType msgType;// 消息类型
|
| | | private Integer orderCount;// 订单数(奖金适用)
|
| | | private Integer goodsCount;
|
| | | private String orderId;// 订单号(返利适用)
|
| | | private GoodsSourceTypeEnum sourceType;// 产生订单的商品来源类型
|
| | | private Extract extract;// 提现详情
|
| | | private BigDecimal money;// 到账资金
|
| | | private BigDecimal balance;// 账户余额
|
| | | private String beiZhu;// 备注
|
| | | private Date createTime;
|
| | | private Date updateTime;
|
| | | private Boolean read;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public UserInfo getUser() {
|
| | | return user;
|
| | | }
|
| | |
|
| | | public void setUser(UserInfo user) {
|
| | | this.user = user;
|
| | | }
|
| | |
|
| | | public MsgTypeMoneyEnumType getMsgType() {
|
| | | return msgType;
|
| | | }
|
| | |
|
| | | public void setMsgType(MsgTypeMoneyEnumType msgType) {
|
| | | this.msgType = msgType;
|
| | | }
|
| | |
|
| | | public Integer getOrderCount() {
|
| | | return orderCount;
|
| | | }
|
| | |
|
| | | public void setOrderCount(Integer orderCount) {
|
| | | this.orderCount = orderCount;
|
| | | }
|
| | |
|
| | | public Integer getGoodsCount() {
|
| | | return goodsCount;
|
| | | }
|
| | |
|
| | | public void setGoodsCount(Integer goodsCount) {
|
| | | this.goodsCount = goodsCount;
|
| | | }
|
| | |
|
| | | public String getOrderId() {
|
| | | return orderId;
|
| | | }
|
| | |
|
| | | public void setOrderId(String orderId) {
|
| | | this.orderId = orderId;
|
| | | }
|
| | |
|
| | | public GoodsSourceTypeEnum getSourceType() {
|
| | | return sourceType;
|
| | | }
|
| | |
|
| | | public void setSourceType(GoodsSourceTypeEnum sourceType) {
|
| | | this.sourceType = sourceType;
|
| | | }
|
| | |
|
| | | public Extract getExtract() {
|
| | | return extract;
|
| | | }
|
| | |
|
| | | public void setExtract(Extract extract) {
|
| | | this.extract = extract;
|
| | | }
|
| | |
|
| | | public BigDecimal getMoney() {
|
| | | return money;
|
| | | }
|
| | |
|
| | | public void setMoney(BigDecimal money) {
|
| | | this.money = money;
|
| | | }
|
| | |
|
| | | public BigDecimal getBalance() {
|
| | | return balance;
|
| | | }
|
| | |
|
| | | public void setBalance(BigDecimal balance) {
|
| | | this.balance = balance;
|
| | | }
|
| | |
|
| | | public String getBeiZhu() {
|
| | | return beiZhu;
|
| | | }
|
| | |
|
| | | public void setBeiZhu(String beiZhu) {
|
| | | this.beiZhu = beiZhu;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public Boolean getRead() {
|
| | | return read;
|
| | | }
|
| | |
|
| | | public void setRead(Boolean read) {
|
| | | this.read = read;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | <!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.homemodule.SuperSpecialCardMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard"> |
| | | <id column="sp_id" property="id" jdbcType="BIGINT"/> |
| | | |
| | | <association property="specialCard" column="sp_special_cid" |
| | | javaType="com.yeshi.fanli.entity.bus.homemodule.SpecialCard"> |
| | | <id column="sp_special_cid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <association property="system" column="sp_system_id" |
| | | javaType="com.yeshi.fanli.entity.system.System"> |
| | | <id column="sp_system_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">sp_id,sp_special_cid,sp_system_id</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_super_special_card where sp_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_super_special_card where sp_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_super_special_card (sp_id,sp_special_cid,sp_system_id) values (#{id,jdbcType=BIGINT},#{specialCard.id,jdbcType=BIGINT},#{system.id,jdbcType=BIGINT})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_super_special_card |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sp_id,</if> |
| | | <if test="specialCard != null">sp_special_cid,</if> |
| | | <if test="system != null">sp_system_id,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="specialCard != null">#{specialCard.id,jdbcType=BIGINT},</if> |
| | | <if test="system != null">#{system.id,jdbcType=BIGINT},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard">update yeshi_ec_super_special_card set sp_special_cid = #{specialCard.id,jdbcType=BIGINT},sp_system_id = #{system.id,jdbcType=BIGINT} where sp_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard">update yeshi_ec_super_special_card |
| | | <set> |
| | | <if test="specialCard != null">sp_special_cid=#{specialCard.id,jdbcType=BIGINT},</if> |
| | | <if test="system != null">sp_system_id=#{system.id,jdbcType=BIGINT},</if> |
| | | </set> where sp_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="listByCardIDs" parameterType="java.util.List" resultMap="BaseResultMap"> |
| | | SELECT sp.* FROM `yeshi_ec_super_special_card` sp |
| | | LEFT JOIN `yeshi_ec_special_card` pp ON sp.sp_special_cid = pp.`cd_id` |
| | | WHERE pp.`cd_id` in <foreach collection="list" item="item" open="(" separator="," close=")">#{item}</foreach> |
| | | </select> |
| | | |
| | | <delete id="deleteBatchByCardId" parameterType="java.util.List"> |
| | | delete from yeshi_ec_super_special_card WHERE sp_special_cid in |
| | | <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |
| | | </delete> |
| | | |
| | | <select id="querybyCardIdAndSystemId" resultMap="BaseResultMap"> |
| | | SELECT * FROM `yeshi_ec_super_special_card` WHERE sp_special_cid = #{cardId} and sp_system_id = #{systemId} |
| | | </select> |
| | | |
| | | <delete id="deletebyCardIdAndSystemId"> |
| | | delete from yeshi_ec_super_special_card WHERE sp_special_cid = #{cardId} and sp_system_id = #{systemId} |
| | | </delete> |
| | | |
| | | </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);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.homemodule;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.homemodule.SuperSpecialCardMapper;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SuperSpecialCardService;
|
| | |
|
| | |
|
| | | @Service
|
| | | public class SuperSpecialCardServiceImpl implements SuperSpecialCardService {
|
| | | |
| | | @Resource
|
| | | private SystemService systemService;
|
| | | |
| | | @Resource
|
| | | private SuperSpecialCardMapper superSpecialCardMapper;
|
| | |
|
| | | |
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) {
|
| | | return superSpecialCardMapper.deleteByPrimaryKey(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int insert(SuperSpecialCard record) {
|
| | | return superSpecialCardMapper.insert(record);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int insertSelective(SuperSpecialCard record) {
|
| | | return superSpecialCardMapper.insertSelective(record);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public SuperSpecialCard selectByPrimaryKey(Long id) {
|
| | | return superSpecialCardMapper.selectByPrimaryKey(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int updateByPrimaryKeySelective(SuperSpecialCard record) {
|
| | | return superSpecialCardMapper.updateByPrimaryKeySelective(record);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int updateByPrimaryKey(SuperSpecialCard record) {
|
| | | return superSpecialCardMapper.updateByPrimaryKey(record);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int deleteBatchByCardId(List<Long> list) {
|
| | | return superSpecialCardMapper.deleteBatchByCardId(list);
|
| | | }
|
| | | |
| | | @Override
|
| | | public void deletebyCardIdAndSystemId(Long cardId, Long systemId) throws Exception {
|
| | | superSpecialCardMapper.deletebyCardIdAndSystemId(cardId, systemId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<SuperSpecialCard> querybyCardIdAndSystemId(Long cardId, Long systemId) throws Exception {
|
| | | return superSpecialCardMapper.querybyCardIdAndSystemId(cardId, systemId);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | |
| | | 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.homemodule;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | |
|
| | | /**
|
| | | * 专题-系统
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface SuperSpecialCardService {
|
| | |
|
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(SuperSpecialCard record);
|
| | |
|
| | | public int insertSelective(SuperSpecialCard record);
|
| | |
|
| | | public SuperSpecialCard selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(SuperSpecialCard record);
|
| | |
|
| | | public int updateByPrimaryKey(SuperSpecialCard record);
|
| | | |
| | | public int deleteBatchByCardId(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 删除系统
|
| | | * @param cardId
|
| | | * @param systemId
|
| | | */
|
| | | public void deletebyCardIdAndSystemId(Long cardId, Long systemId) throws Exception ;
|
| | | |
| | | /**
|
| | | * 查询系统
|
| | | * @param cardId
|
| | | * @param systemId
|
| | | */
|
| | | public List<SuperSpecialCard> querybyCardIdAndSystemId(Long cardId, Long systemId) throws Exception ;
|
| | | |
| | | }
|
| | |
| | | public static boolean IS_TASK = false;
|
| | |
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = true;
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = false;
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
|
| | |
| | | #druid.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
|