master
袁野 6 months ago
parent 7458b9f070
commit 815c80186a
  1. 182
      bweb/src/main/java/com/bweb/controller/audit/AuditController.java
  2. 52
      bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java
  3. 66
      bweb/src/main/java/com/bweb/controller/goods/GoodsController.java
  4. 1
      cweb/src/main/java/com/cweb/config/AuthConfig.java
  5. 47
      cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
  6. 3
      cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
  7. 2
      service/src/main/java/com/hfkj/common/utils/MD5Util.java
  8. 67
      service/src/main/java/com/hfkj/common/utils/OrderUtil.java
  9. 2
      service/src/main/java/com/hfkj/common/utils/StreamUtil.java
  10. 142
      service/src/main/java/com/hfkj/dao/AuditMsgMapper.java
  11. 7
      service/src/main/java/com/hfkj/dao/AuditMsgMapperExt.java
  12. 388
      service/src/main/java/com/hfkj/dao/AuditMsgSqlProvider.java
  13. 128
      service/src/main/java/com/hfkj/dao/CmsContentMapper.java
  14. 7
      service/src/main/java/com/hfkj/dao/CmsContentMapperExt.java
  15. 346
      service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java
  16. 27
      service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java
  17. 44
      service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java
  18. 151
      service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java
  19. 7
      service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapperExt.java
  20. 430
      service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java
  21. 296
      service/src/main/java/com/hfkj/entity/AuditMsg.java
  22. 1263
      service/src/main/java/com/hfkj/entity/AuditMsgExample.java
  23. 248
      service/src/main/java/com/hfkj/entity/CmsContent.java
  24. 1083
      service/src/main/java/com/hfkj/entity/CmsContentExample.java
  25. 50
      service/src/main/java/com/hfkj/entity/GoodsMsg.java
  26. 178
      service/src/main/java/com/hfkj/entity/GoodsMsgExample.java
  27. 354
      service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java
  28. 1434
      service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java
  29. 11
      service/src/main/java/com/hfkj/model/audit/AuditModel.java
  30. 1
      service/src/main/java/com/hfkj/service/FileUploadService.java
  31. 64
      service/src/main/java/com/hfkj/service/audit/AuditMsgService.java
  32. 58
      service/src/main/java/com/hfkj/service/audit/impl/AuditMsgServiceImpl.java
  33. 71
      service/src/main/java/com/hfkj/service/cms/CmsContentService.java
  34. 57
      service/src/main/java/com/hfkj/service/cms/impl/CmsContentServiceImpl.java
  35. 1
      service/src/main/java/com/hfkj/service/goods/GoodsMsgService.java
  36. 3
      service/src/main/java/com/hfkj/service/goods/impl/GoodsMsgServiceImpl.java

@ -0,0 +1,182 @@
package com.bweb.controller.audit;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.SessionObject;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.AuditMsg;
import com.hfkj.entity.GoodsMsg;
import com.hfkj.entity.GoodsSpecs;
import com.hfkj.entity.GoodsVpd;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.audit.AuditModel;
import com.hfkj.model.goods.GoodsModel;
import com.hfkj.model.goods.GoodsModelSpecs;
import com.hfkj.service.audit.AuditMsgService;
import com.hfkj.service.goods.GoodsMsgService;
import com.hfkj.service.goods.GoodsSpecsService;
import com.hfkj.service.goods.GoodsVpdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
@Controller
@RequestMapping(value="/audit")
@Api(value="审核业务")
public class AuditController {
private static final Logger log = LoggerFactory.getLogger(AuditController.class);
@Resource
private AuditMsgService auditMsgService;
@Resource
private UserCenter userCenter;
@Resource
private GoodsMsgService goodsMsgService;
@Resource
private GoodsSpecsService goodsSpecsService;
@Resource
private GoodsVpdService goodsVpdService;
@RequestMapping(value="/getListGoodsAudit",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
public ResponseData getListGoodsAudit(@RequestParam(value = "submitObjectName" , required = false) String submitObjectName,
@RequestParam(value = "submitOpName" , required = false) String submitOpName,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
Map<String , Object> map = new HashMap<>();
map.put("submitObjectName", submitObjectName);
map.put("submitOpName", submitOpName);
map.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(auditMsgService.getList(map)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/auditMsg",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "审核内容")
public ResponseData auditMsg(
@RequestBody AuditMsg body, HttpServletRequest request
) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (body == null
|| body.getId() == null
|| body.getStatus() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
AuditMsg auditMsg = auditMsgService.queryDetail(body.getId());
if (auditMsg.getStatus() != 2) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前状态不可操作");
}
auditMsg.setStatus(body.getStatus());
auditMsg.setRemarks(body.getRemarks());
auditMsg.setAuditOpId(userModel.getAccount().getId());
auditMsg.setAuditOpName(userModel.getAccount().getUserName());
auditMsgService.update(auditMsg);
GoodsMsg goodsMsg = goodsMsgService.queryDetail(auditMsg.getSubmitObjectId());
goodsMsg.setStatus(1);
goodsMsg.setUpdateTime(new Date());
goodsMsgService.update(goodsMsg);
return ResponseMsgUtil.success("成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/auditDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "审核详情")
public ResponseData auditDetail(@RequestParam(value = "id" , required = false) Long id) {
try {
AuditModel auditModel = new AuditModel();
AuditMsg auditMsg = auditMsgService.queryDetail(id);
if (auditMsg == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!");
}
BeanUtils.copyProperties(auditMsg, auditModel);
GoodsMsg goodsMsg = goodsMsgService.queryDetail(auditMsg.getSubmitObjectId());
if (goodsMsg == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!");
}
GoodsModel goodsModel = new GoodsModel();
BeanUtils.copyProperties(goodsMsg, goodsModel);
Map<String , Object> map = new HashMap<>();
map.put("goodsId" , goodsMsg.getId());
List<GoodsSpecs> goodsSpecs = goodsSpecsService.getList(map);
List<GoodsModelSpecs> goodsModelSpecs = new ArrayList<>();
for (GoodsSpecs goodsSpec : goodsSpecs) {
GoodsModelSpecs goodsModelSpec = new GoodsModelSpecs();
BeanUtils.copyProperties(goodsSpec, goodsModelSpec);
GoodsVpd goodsVpd = goodsVpdService.queryDetailBySpecsId(goodsSpec.getId());
if (goodsVpd != null) {
BeanUtils.copyProperties(goodsVpd, goodsModelSpec);
}
goodsModelSpec.setSpecsId(goodsSpec.getId());
goodsModelSpecs.add(goodsModelSpec);
}
goodsModel.setGoodsModelSpecs(goodsModelSpecs);
auditModel.setGoodsModel(goodsModel);
return ResponseMsgUtil.success(auditModel);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,52 @@
package com.bweb.controller.cms;
import com.bweb.controller.BsMerController;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerService;
import com.hfkj.service.cms.CmsContentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value="/cms")
@Api(value="cms")
public class CmsContentController {
Logger log = LoggerFactory.getLogger(CmsContentController.class);
@Resource
private CmsContentService cmsContentService;
@RequestMapping(value="/getListBrand",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
public ResponseData getListBrand(@RequestParam(value = "code" , required = false) String code) {
try {
Map<String , Object> map = new HashMap<>();
map.put("code", code);
return ResponseMsgUtil.success(cmsContentService.getList(map));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -7,12 +7,13 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode; import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.SessionObject; import com.hfkj.common.security.SessionObject;
import com.hfkj.common.security.UserCenter; import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.OrderUtil;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.*; import com.hfkj.entity.*;
import com.hfkj.model.goods.GoodsModel;
import com.hfkj.model.goods.GoodsModelSpecs; import com.hfkj.model.goods.GoodsModelSpecs;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject; import com.hfkj.model.SecUserSessionObject;
import com.hfkj.service.audit.AuditMsgService;
import com.hfkj.service.goods.*; import com.hfkj.service.goods.*;
import com.hfkj.sysenum.SecUserObjectTypeEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -50,6 +51,9 @@ public class GoodsController {
@Resource @Resource
private GoodsVpdService goodsVpdService; private GoodsVpdService goodsVpdService;
@Resource
private AuditMsgService auditMsgService;
@Resource @Resource
private UserCenter userCenter; private UserCenter userCenter;
@ -94,14 +98,24 @@ public class GoodsController {
goodsMsg.setSaleNum(0); goodsMsg.setSaleNum(0);
} }
GoodsType goodsType = goodsTypeService.queryDetail(body.getGoodsType());
if (goodsType.getParentId() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "一级分类不可选择!");
}
goodsMsg.setUpdateTime(new Date()); goodsMsg.setUpdateTime(new Date());
goodsMsg.setGoodsBrandName(goodsBrandService.findGoodsBrandName(body.getGoodsBrand())); goodsMsg.setGoodsBrandName(goodsBrandService.findGoodsBrandName(body.getGoodsBrand()));
goodsMsg.setGoodsTypeName(goodsTypeService.findGoodsType(body.getGoodsType())); goodsMsg.setGoodsTypeName(goodsTypeService.findGoodsType(body.getGoodsType()));
goodsMsg.setGoodsType(body.getGoodsType()); goodsMsg.setGoodsType(body.getGoodsType());
goodsMsg.setGoodsTypeParent(goodsType.getParentId());
goodsMsg.setGoodsTypeParentName(goodsTypeService.findGoodsType(goodsType.getParentId()));
goodsMsg.setType(body.getType()); goodsMsg.setType(body.getType());
goodsMsg.setGoodsBrand(body.getGoodsBrand()); goodsMsg.setGoodsBrand(body.getGoodsBrand());
goodsMsg.setStatus(2); goodsMsg.setStatus(2);
goodsMsg.setTitle(body.getTitle()); goodsMsg.setTitle(body.getTitle());
goodsMsg.setGoodsExplain(body.getGoodsExplain());
goodsMsg.setGoodsLabel(body.getGoodsLabel());
goodsMsg.setListImg(body.getListImg()); goodsMsg.setListImg(body.getListImg());
goodsMsg.setBannerImg(body.getBannerImg()); goodsMsg.setBannerImg(body.getBannerImg());
goodsMsg.setDetailImg(body.getDetailImg()); goodsMsg.setDetailImg(body.getDetailImg());
@ -332,7 +346,6 @@ public class GoodsController {
} }
@RequestMapping(value="/deleteGoodsMsg",method = RequestMethod.GET) @RequestMapping(value="/deleteGoodsMsg",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "删除") @ApiOperation(value = "删除")
public ResponseData deleteGoodsMsg(@RequestParam(value = "id" , required = false) Long id) { public ResponseData deleteGoodsMsg(@RequestParam(value = "id" , required = false) Long id) {
try { try {
@ -363,5 +376,54 @@ public class GoodsController {
} }
} }
@RequestMapping(value="/goodsAudit",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "商品上下架")
public ResponseData goodsAudit(@RequestParam(value = "id" , required = false) Long id, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
GoodsMsg goodsMsg = goodsMsgService.queryDetail(id);
if (goodsMsg.getStatus() == 1) {
goodsMsg.setStatus(2);
goodsMsg.setUpdateTime(new Date());
} else if (goodsMsg.getStatus() == 2) {
goodsMsg.setStatus(3);
goodsMsg.setUpdateTime(new Date());
AuditMsg auditMsg = new AuditMsg();
auditMsg.setSubmitObjectId(goodsMsg.getId());
auditMsg.setSubmitObjectName(goodsMsg.getTitle());
auditMsg.setSubmitOpId(userModel.getAccount().getId());
auditMsg.setSubmitOpName(userModel.getAccount().getUserName());
auditMsg.setType(1);
auditMsg.setAuditSerialNo(OrderUtil.generateOrderNo());
auditMsg.setStatus(2);
auditMsg.setUpdateTime(new Date());
auditMsg.setCreateTime(new Date());
auditMsgService.create(auditMsg);
} else if (goodsMsg.getStatus() == 3) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前状态不可操作!");
}
goodsMsgService.update(goodsMsg);
return ResponseMsgUtil.success("成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -87,6 +87,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/springfox-swagger-ui/**") .excludePathPatterns("/**/springfox-swagger-ui/**")
.excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/goods/*") .excludePathPatterns("/goods/*")
.excludePathPatterns("/cms/*")
; ;
} }

@ -0,0 +1,47 @@
package com.cweb.controller.cms;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.model.ResponseData;
import com.hfkj.service.cms.CmsContentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value="/cms")
@Api(value="cms")
public class CmsContentController {
Logger log = LoggerFactory.getLogger(CmsContentController.class);
@Resource
private CmsContentService cmsContentService;
@RequestMapping(value="/getListBrand",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
public ResponseData getListBrand(@RequestParam(value = "code" , required = false) String code) {
try {
Map<String , Object> map = new HashMap<>();
map.put("code", code);
return ResponseMsgUtil.success(cmsContentService.getList(map));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -98,6 +98,7 @@ public class GoodsController {
@ApiOperation(value = "查询商品列表") @ApiOperation(value = "查询商品列表")
public ResponseData getListGoods( public ResponseData getListGoods(
@RequestParam(value = "title", required = false) String title, @RequestParam(value = "title", required = false) String title,
@RequestParam(value = "goodsTypeParent", required = false) Long goodsTypeParent,
@RequestParam(value = "goodsType", required = false) Long goodsType, @RequestParam(value = "goodsType", required = false) Long goodsType,
@RequestParam(value = "goodsBrand", required = false) Long goodsBrand, @RequestParam(value = "goodsBrand", required = false) Long goodsBrand,
@RequestParam(value = "price", required = false) Integer price, @RequestParam(value = "price", required = false) Integer price,
@ -113,6 +114,7 @@ public class GoodsController {
map.put("title", title); map.put("title", title);
map.put("goodsType", goodsType); map.put("goodsType", goodsType);
map.put("goodsTypeParent", goodsTypeParent);
map.put("goodsBrand", goodsBrand); map.put("goodsBrand", goodsBrand);
map.put("saleNum", saleNum); map.put("saleNum", saleNum);
map.put("time", time); map.put("time", time);
@ -168,6 +170,7 @@ public class GoodsController {
} }
@RequestMapping(value="/getGoodsDetail",method = RequestMethod.GET) @RequestMapping(value="/getGoodsDetail",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询商品详情") @ApiOperation(value = "查询商品详情")

@ -10,7 +10,7 @@ import java.security.MessageDigest;
* @author: 胡锐 * @author: 胡锐
* @date: 2019年5月6日 上午10:13:26 * @date: 2019年5月6日 上午10:13:26
* *
* @Copyright: 2019 www.shinwoten.com Inc. All rights reserved.
*/ */
public class MD5Util { public class MD5Util {

@ -0,0 +1,67 @@
package com.hfkj.common.utils;
import java.util.*;
/**
* 订单工具类
* @className: OrderUtil
* @author: HuRui
* @date: 2022/8/26
**/
public class OrderUtil {
/**
* 生成交易订单号
* @return
* @throws Exception
*/
public static String generateOrderNo(){
try {
// 5位随机数 + 1位线程生成数
String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1);
// 生成订单号
return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum;
} catch (Exception e) {
return null;
}
}
/**
* 生成合同订单订单号
* @return
* @throws Exception
*/
public static String generateContractNo(){
try {
// 5位随机数 + 1位线程生成数
String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1);
// 生成订单号
return DateUtil.date2String(new Date(),"yyyyMMdd") + randomNum;
} catch (Exception e) {
return null;
}
}
/**
* 生成子订单号
* @return
* @throws Exception
*/
public static String generateChildOrderNo() {
// 生成子订单号
return IDGenerator.nextId(16);
}
/**
* 生成退款订单号
* @return
* @throws Exception
*/
public static String generateRefundOrderNo() throws Exception {
// 5位随机数 + 1位线程生成数
String randomNum = (new Random().nextInt(899999) + 10000) + IDGenerator.nextId(1);
// 生成订单号
return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum;
}
}

@ -12,7 +12,7 @@ import java.util.function.Predicate;
* @author: 胡锐 * @author: 胡锐
* @date: 2019年3月25日 下午4:14:00 * @date: 2019年3月25日 下午4:14:00
* *
* @Copyright: 2019 www.shinwoten.com Inc. All rights reserved.
*/ */
public class StreamUtil { public class StreamUtil {

@ -0,0 +1,142 @@
package com.hfkj.dao;
import com.hfkj.entity.AuditMsg;
import com.hfkj.entity.AuditMsgExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface AuditMsgMapper extends AuditMsgMapperExt {
@SelectProvider(type=AuditMsgSqlProvider.class, method="countByExample")
long countByExample(AuditMsgExample example);
@DeleteProvider(type=AuditMsgSqlProvider.class, method="deleteByExample")
int deleteByExample(AuditMsgExample example);
@Delete({
"delete from audit_msg",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into audit_msg (`type`, submit_object_id, ",
"submit_object_name, submit_op_name, ",
"submit_op_id, audit_serial_no, ",
"remarks, create_time, ",
"update_time, audit_op_id, ",
"audit_op_name, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{type,jdbcType=INTEGER}, #{submitObjectId,jdbcType=BIGINT}, ",
"#{submitObjectName,jdbcType=VARCHAR}, #{submitOpName,jdbcType=VARCHAR}, ",
"#{submitOpId,jdbcType=BIGINT}, #{auditSerialNo,jdbcType=VARCHAR}, ",
"#{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{auditOpId,jdbcType=BIGINT}, ",
"#{auditOpName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(AuditMsg record);
@InsertProvider(type=AuditMsgSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(AuditMsg record);
@SelectProvider(type=AuditMsgSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="submit_object_id", property="submitObjectId", jdbcType=JdbcType.BIGINT),
@Result(column="submit_object_name", property="submitObjectName", jdbcType=JdbcType.VARCHAR),
@Result(column="submit_op_name", property="submitOpName", jdbcType=JdbcType.VARCHAR),
@Result(column="submit_op_id", property="submitOpId", jdbcType=JdbcType.BIGINT),
@Result(column="audit_serial_no", property="auditSerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="audit_op_id", property="auditOpId", jdbcType=JdbcType.BIGINT),
@Result(column="audit_op_name", property="auditOpName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<AuditMsg> selectByExample(AuditMsgExample example);
@Select({
"select",
"id, `type`, submit_object_id, submit_object_name, submit_op_name, submit_op_id, ",
"audit_serial_no, remarks, create_time, update_time, audit_op_id, audit_op_name, ",
"`status`, ext_1, ext_2, ext_3",
"from audit_msg",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="submit_object_id", property="submitObjectId", jdbcType=JdbcType.BIGINT),
@Result(column="submit_object_name", property="submitObjectName", jdbcType=JdbcType.VARCHAR),
@Result(column="submit_op_name", property="submitOpName", jdbcType=JdbcType.VARCHAR),
@Result(column="submit_op_id", property="submitOpId", jdbcType=JdbcType.BIGINT),
@Result(column="audit_serial_no", property="auditSerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="audit_op_id", property="auditOpId", jdbcType=JdbcType.BIGINT),
@Result(column="audit_op_name", property="auditOpName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
AuditMsg selectByPrimaryKey(Long id);
@UpdateProvider(type=AuditMsgSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") AuditMsg record, @Param("example") AuditMsgExample example);
@UpdateProvider(type=AuditMsgSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") AuditMsg record, @Param("example") AuditMsgExample example);
@UpdateProvider(type=AuditMsgSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(AuditMsg record);
@Update({
"update audit_msg",
"set `type` = #{type,jdbcType=INTEGER},",
"submit_object_id = #{submitObjectId,jdbcType=BIGINT},",
"submit_object_name = #{submitObjectName,jdbcType=VARCHAR},",
"submit_op_name = #{submitOpName,jdbcType=VARCHAR},",
"submit_op_id = #{submitOpId,jdbcType=BIGINT},",
"audit_serial_no = #{auditSerialNo,jdbcType=VARCHAR},",
"remarks = #{remarks,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"audit_op_id = #{auditOpId,jdbcType=BIGINT},",
"audit_op_name = #{auditOpName,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(AuditMsg record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface AuditMsgMapperExt {
}

@ -0,0 +1,388 @@
package com.hfkj.dao;
import com.hfkj.entity.AuditMsg;
import com.hfkj.entity.AuditMsgExample.Criteria;
import com.hfkj.entity.AuditMsgExample.Criterion;
import com.hfkj.entity.AuditMsgExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class AuditMsgSqlProvider {
public String countByExample(AuditMsgExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("audit_msg");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(AuditMsgExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("audit_msg");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(AuditMsg record) {
SQL sql = new SQL();
sql.INSERT_INTO("audit_msg");
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getSubmitObjectId() != null) {
sql.VALUES("submit_object_id", "#{submitObjectId,jdbcType=BIGINT}");
}
if (record.getSubmitObjectName() != null) {
sql.VALUES("submit_object_name", "#{submitObjectName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpName() != null) {
sql.VALUES("submit_op_name", "#{submitOpName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpId() != null) {
sql.VALUES("submit_op_id", "#{submitOpId,jdbcType=BIGINT}");
}
if (record.getAuditSerialNo() != null) {
sql.VALUES("audit_serial_no", "#{auditSerialNo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditOpId() != null) {
sql.VALUES("audit_op_id", "#{auditOpId,jdbcType=BIGINT}");
}
if (record.getAuditOpName() != null) {
sql.VALUES("audit_op_name", "#{auditOpName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(AuditMsgExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("`type`");
sql.SELECT("submit_object_id");
sql.SELECT("submit_object_name");
sql.SELECT("submit_op_name");
sql.SELECT("submit_op_id");
sql.SELECT("audit_serial_no");
sql.SELECT("remarks");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("audit_op_id");
sql.SELECT("audit_op_name");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("audit_msg");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
AuditMsg record = (AuditMsg) parameter.get("record");
AuditMsgExample example = (AuditMsgExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("audit_msg");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getSubmitObjectId() != null) {
sql.SET("submit_object_id = #{record.submitObjectId,jdbcType=BIGINT}");
}
if (record.getSubmitObjectName() != null) {
sql.SET("submit_object_name = #{record.submitObjectName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpName() != null) {
sql.SET("submit_op_name = #{record.submitOpName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpId() != null) {
sql.SET("submit_op_id = #{record.submitOpId,jdbcType=BIGINT}");
}
if (record.getAuditSerialNo() != null) {
sql.SET("audit_serial_no = #{record.auditSerialNo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditOpId() != null) {
sql.SET("audit_op_id = #{record.auditOpId,jdbcType=BIGINT}");
}
if (record.getAuditOpName() != null) {
sql.SET("audit_op_name = #{record.auditOpName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("audit_msg");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("submit_object_id = #{record.submitObjectId,jdbcType=BIGINT}");
sql.SET("submit_object_name = #{record.submitObjectName,jdbcType=VARCHAR}");
sql.SET("submit_op_name = #{record.submitOpName,jdbcType=VARCHAR}");
sql.SET("submit_op_id = #{record.submitOpId,jdbcType=BIGINT}");
sql.SET("audit_serial_no = #{record.auditSerialNo,jdbcType=VARCHAR}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("audit_op_id = #{record.auditOpId,jdbcType=BIGINT}");
sql.SET("audit_op_name = #{record.auditOpName,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
AuditMsgExample example = (AuditMsgExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(AuditMsg record) {
SQL sql = new SQL();
sql.UPDATE("audit_msg");
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getSubmitObjectId() != null) {
sql.SET("submit_object_id = #{submitObjectId,jdbcType=BIGINT}");
}
if (record.getSubmitObjectName() != null) {
sql.SET("submit_object_name = #{submitObjectName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpName() != null) {
sql.SET("submit_op_name = #{submitOpName,jdbcType=VARCHAR}");
}
if (record.getSubmitOpId() != null) {
sql.SET("submit_op_id = #{submitOpId,jdbcType=BIGINT}");
}
if (record.getAuditSerialNo() != null) {
sql.SET("audit_serial_no = #{auditSerialNo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{remarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditOpId() != null) {
sql.SET("audit_op_id = #{auditOpId,jdbcType=BIGINT}");
}
if (record.getAuditOpName() != null) {
sql.SET("audit_op_name = #{auditOpName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, AuditMsgExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,128 @@
package com.hfkj.dao;
import com.hfkj.entity.CmsContent;
import com.hfkj.entity.CmsContentExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface CmsContentMapper extends CmsContentMapperExt {
@SelectProvider(type=CmsContentSqlProvider.class, method="countByExample")
long countByExample(CmsContentExample example);
@DeleteProvider(type=CmsContentSqlProvider.class, method="deleteByExample")
int deleteByExample(CmsContentExample example);
@Delete({
"delete from cms_content",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into cms_content (code, `name`, ",
"img, jump_type, jump_url, ",
"appid, create_time, ",
"update_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ",
"#{img,jdbcType=VARCHAR}, #{jumpType,jdbcType=INTEGER}, #{jumpUrl,jdbcType=VARCHAR}, ",
"#{appid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(CmsContent record);
@InsertProvider(type=CmsContentSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(CmsContent record);
@SelectProvider(type=CmsContentSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER),
@Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<CmsContent> selectByExample(CmsContentExample example);
@Select({
"select",
"id, code, `name`, img, jump_type, jump_url, appid, create_time, update_time, ",
"`status`, ext_1, ext_2, ext_3",
"from cms_content",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER),
@Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
CmsContent selectByPrimaryKey(Long id);
@UpdateProvider(type=CmsContentSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") CmsContent record, @Param("example") CmsContentExample example);
@UpdateProvider(type=CmsContentSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") CmsContent record, @Param("example") CmsContentExample example);
@UpdateProvider(type=CmsContentSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(CmsContent record);
@Update({
"update cms_content",
"set code = #{code,jdbcType=VARCHAR},",
"`name` = #{name,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"jump_type = #{jumpType,jdbcType=INTEGER},",
"jump_url = #{jumpUrl,jdbcType=VARCHAR},",
"appid = #{appid,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(CmsContent record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface CmsContentMapperExt {
}

@ -0,0 +1,346 @@
package com.hfkj.dao;
import com.hfkj.entity.CmsContent;
import com.hfkj.entity.CmsContentExample.Criteria;
import com.hfkj.entity.CmsContentExample.Criterion;
import com.hfkj.entity.CmsContentExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class CmsContentSqlProvider {
public String countByExample(CmsContentExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("cms_content");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(CmsContentExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("cms_content");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(CmsContent record) {
SQL sql = new SQL();
sql.INSERT_INTO("cms_content");
if (record.getCode() != null) {
sql.VALUES("code", "#{code,jdbcType=VARCHAR}");
}
if (record.getName() != null) {
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.VALUES("img", "#{img,jdbcType=VARCHAR}");
}
if (record.getJumpType() != null) {
sql.VALUES("jump_type", "#{jumpType,jdbcType=INTEGER}");
}
if (record.getJumpUrl() != null) {
sql.VALUES("jump_url", "#{jumpUrl,jdbcType=VARCHAR}");
}
if (record.getAppid() != null) {
sql.VALUES("appid", "#{appid,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(CmsContentExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("code");
sql.SELECT("`name`");
sql.SELECT("img");
sql.SELECT("jump_type");
sql.SELECT("jump_url");
sql.SELECT("appid");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("cms_content");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
CmsContent record = (CmsContent) parameter.get("record");
CmsContentExample example = (CmsContentExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("cms_content");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getCode() != null) {
sql.SET("code = #{record.code,jdbcType=VARCHAR}");
}
if (record.getName() != null) {
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
}
if (record.getJumpType() != null) {
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}");
}
if (record.getJumpUrl() != null) {
sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}");
}
if (record.getAppid() != null) {
sql.SET("appid = #{record.appid,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("cms_content");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("code = #{record.code,jdbcType=VARCHAR}");
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}");
sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}");
sql.SET("appid = #{record.appid,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
CmsContentExample example = (CmsContentExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(CmsContent record) {
SQL sql = new SQL();
sql.UPDATE("cms_content");
if (record.getCode() != null) {
sql.SET("code = #{code,jdbcType=VARCHAR}");
}
if (record.getName() != null) {
sql.SET("`name` = #{name,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.SET("img = #{img,jdbcType=VARCHAR}");
}
if (record.getJumpType() != null) {
sql.SET("jump_type = #{jumpType,jdbcType=INTEGER}");
}
if (record.getJumpUrl() != null) {
sql.SET("jump_url = #{jumpUrl,jdbcType=VARCHAR}");
}
if (record.getAppid() != null) {
sql.SET("appid = #{appid,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, CmsContentExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -39,7 +39,8 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into goods_msg (goods_type_name, goods_type, ", "insert into goods_msg (goods_type, goods_type_name, ",
"goods_type_parent, goods_type_parent_name, ",
"sale_num, `type`, goods_brand_name, ", "sale_num, `type`, goods_brand_name, ",
"goods_brand, goods_label, ", "goods_brand, goods_label, ",
"goods_explain, title, ", "goods_explain, title, ",
@ -48,7 +49,8 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
"create_time, update_time, ", "create_time, update_time, ",
"mer_id, mer_name, ext_1, ", "mer_id, mer_name, ext_1, ",
"ext_2, ext_3)", "ext_2, ext_3)",
"values (#{goodsTypeName,jdbcType=VARCHAR}, #{goodsType,jdbcType=BIGINT}, ", "values (#{goodsType,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ",
"#{goodsTypeParent,jdbcType=BIGINT}, #{goodsTypeParentName,jdbcType=VARCHAR}, ",
"#{saleNum,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{goodsBrandName,jdbcType=VARCHAR}, ", "#{saleNum,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{goodsBrandName,jdbcType=VARCHAR}, ",
"#{goodsBrand,jdbcType=BIGINT}, #{goodsLabel,jdbcType=VARCHAR}, ", "#{goodsBrand,jdbcType=BIGINT}, #{goodsLabel,jdbcType=VARCHAR}, ",
"#{goodsExplain,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ", "#{goodsExplain,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ",
@ -68,8 +70,10 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@SelectProvider(type=GoodsMsgSqlProvider.class, method="selectByExample") @SelectProvider(type=GoodsMsgSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_parent", property="goodsTypeParent", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR),
@Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER), @Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@ -93,16 +97,19 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Select({ @Select({
"select", "select",
"id, goods_type_name, goods_type, sale_num, `type`, goods_brand_name, goods_brand, ", "id, goods_type, goods_type_name, goods_type_parent, goods_type_parent_name, ",
"goods_label, goods_explain, title, list_img, banner_img, detail_img, `status`, ", "sale_num, `type`, goods_brand_name, goods_brand, goods_label, goods_explain, ",
"create_time, update_time, mer_id, mer_name, ext_1, ext_2, ext_3", "title, list_img, banner_img, detail_img, `status`, create_time, update_time, ",
"mer_id, mer_name, ext_1, ext_2, ext_3",
"from goods_msg", "from goods_msg",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_parent", property="goodsTypeParent", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR),
@Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER), @Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@ -135,8 +142,10 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Update({ @Update({
"update goods_msg", "update goods_msg",
"set goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},", "set goods_type = #{goodsType,jdbcType=BIGINT},",
"goods_type = #{goodsType,jdbcType=BIGINT},", "goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},",
"goods_type_parent = #{goodsTypeParent,jdbcType=BIGINT},",
"goods_type_parent_name = #{goodsTypeParentName,jdbcType=VARCHAR},",
"sale_num = #{saleNum,jdbcType=INTEGER},", "sale_num = #{saleNum,jdbcType=INTEGER},",
"`type` = #{type,jdbcType=INTEGER},", "`type` = #{type,jdbcType=INTEGER},",
"goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},", "goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},",

@ -28,12 +28,20 @@ public class GoodsMsgSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("goods_msg"); sql.INSERT_INTO("goods_msg");
if (record.getGoodsType() != null) {
sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}");
}
if (record.getGoodsTypeName() != null) { if (record.getGoodsTypeName() != null) {
sql.VALUES("goods_type_name", "#{goodsTypeName,jdbcType=VARCHAR}"); sql.VALUES("goods_type_name", "#{goodsTypeName,jdbcType=VARCHAR}");
} }
if (record.getGoodsType() != null) { if (record.getGoodsTypeParent() != null) {
sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}"); sql.VALUES("goods_type_parent", "#{goodsTypeParent,jdbcType=BIGINT}");
}
if (record.getGoodsTypeParentName() != null) {
sql.VALUES("goods_type_parent_name", "#{goodsTypeParentName,jdbcType=VARCHAR}");
} }
if (record.getSaleNum() != null) { if (record.getSaleNum() != null) {
@ -118,8 +126,10 @@ public class GoodsMsgSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("goods_type_name");
sql.SELECT("goods_type"); sql.SELECT("goods_type");
sql.SELECT("goods_type_name");
sql.SELECT("goods_type_parent");
sql.SELECT("goods_type_parent_name");
sql.SELECT("sale_num"); sql.SELECT("sale_num");
sql.SELECT("`type`"); sql.SELECT("`type`");
sql.SELECT("goods_brand_name"); sql.SELECT("goods_brand_name");
@ -159,12 +169,20 @@ public class GoodsMsgSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
} }
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}");
}
if (record.getGoodsTypeName() != null) { if (record.getGoodsTypeName() != null) {
sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}");
} }
if (record.getGoodsType() != null) { if (record.getGoodsTypeParent() != null) {
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); sql.SET("goods_type_parent = #{record.goodsTypeParent,jdbcType=BIGINT}");
}
if (record.getGoodsTypeParentName() != null) {
sql.SET("goods_type_parent_name = #{record.goodsTypeParentName,jdbcType=VARCHAR}");
} }
if (record.getSaleNum() != null) { if (record.getSaleNum() != null) {
@ -248,8 +266,10 @@ public class GoodsMsgSqlProvider {
sql.UPDATE("goods_msg"); sql.UPDATE("goods_msg");
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}");
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}");
sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}");
sql.SET("goods_type_parent = #{record.goodsTypeParent,jdbcType=BIGINT}");
sql.SET("goods_type_parent_name = #{record.goodsTypeParentName,jdbcType=VARCHAR}");
sql.SET("sale_num = #{record.saleNum,jdbcType=INTEGER}"); sql.SET("sale_num = #{record.saleNum,jdbcType=INTEGER}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}"); sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}");
@ -278,12 +298,20 @@ public class GoodsMsgSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("goods_msg"); sql.UPDATE("goods_msg");
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}");
}
if (record.getGoodsTypeName() != null) { if (record.getGoodsTypeName() != null) {
sql.SET("goods_type_name = #{goodsTypeName,jdbcType=VARCHAR}"); sql.SET("goods_type_name = #{goodsTypeName,jdbcType=VARCHAR}");
} }
if (record.getGoodsType() != null) { if (record.getGoodsTypeParent() != null) {
sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}"); sql.SET("goods_type_parent = #{goodsTypeParent,jdbcType=BIGINT}");
}
if (record.getGoodsTypeParentName() != null) {
sql.SET("goods_type_parent_name = #{goodsTypeParentName,jdbcType=VARCHAR}");
} }
if (record.getSaleNum() != null) { if (record.getSaleNum() != null) {

@ -0,0 +1,151 @@
package com.hfkj.dao;
import com.hfkj.entity.GoodsShoppingCart;
import com.hfkj.entity.GoodsShoppingCartExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
@SelectProvider(type=GoodsShoppingCartSqlProvider.class, method="countByExample")
long countByExample(GoodsShoppingCartExample example);
@DeleteProvider(type=GoodsShoppingCartSqlProvider.class, method="deleteByExample")
int deleteByExample(GoodsShoppingCartExample example);
@Delete({
"delete from goods_shopping_cart",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into goods_shopping_cart (goods_id, user_id, ",
"title, img, specs_name, ",
"specs_id, num, price, ",
"whether_check, lose_efficacy, ",
"create_time, update_time, ",
"mer_id, mer_name, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{goodsId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ",
"#{title,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{specsName,jdbcType=VARCHAR}, ",
"#{specsId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"#{whetherCheck,jdbcType=BIT}, #{loseEfficacy,jdbcType=BIT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(GoodsShoppingCart record);
@InsertProvider(type=GoodsShoppingCartSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(GoodsShoppingCart record);
@SelectProvider(type=GoodsShoppingCartSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="specs_name", property="specsName", jdbcType=JdbcType.VARCHAR),
@Result(column="specs_id", property="specsId", jdbcType=JdbcType.BIGINT),
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="lose_efficacy", property="loseEfficacy", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<GoodsShoppingCart> selectByExample(GoodsShoppingCartExample example);
@Select({
"select",
"id, goods_id, user_id, title, img, specs_name, specs_id, num, price, whether_check, ",
"lose_efficacy, create_time, update_time, mer_id, mer_name, `status`, ext_1, ",
"ext_2, ext_3",
"from goods_shopping_cart",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="specs_name", property="specsName", jdbcType=JdbcType.VARCHAR),
@Result(column="specs_id", property="specsId", jdbcType=JdbcType.BIGINT),
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="lose_efficacy", property="loseEfficacy", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
GoodsShoppingCart selectByPrimaryKey(Long id);
@UpdateProvider(type=GoodsShoppingCartSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") GoodsShoppingCart record, @Param("example") GoodsShoppingCartExample example);
@UpdateProvider(type=GoodsShoppingCartSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") GoodsShoppingCart record, @Param("example") GoodsShoppingCartExample example);
@UpdateProvider(type=GoodsShoppingCartSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(GoodsShoppingCart record);
@Update({
"update goods_shopping_cart",
"set goods_id = #{goodsId,jdbcType=BIGINT},",
"user_id = #{userId,jdbcType=BIGINT},",
"title = #{title,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"specs_name = #{specsName,jdbcType=VARCHAR},",
"specs_id = #{specsId,jdbcType=BIGINT},",
"num = #{num,jdbcType=INTEGER},",
"price = #{price,jdbcType=DECIMAL},",
"whether_check = #{whetherCheck,jdbcType=BIT},",
"lose_efficacy = #{loseEfficacy,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(GoodsShoppingCart record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface GoodsShoppingCartMapperExt {
}

@ -0,0 +1,430 @@
package com.hfkj.dao;
import com.hfkj.entity.GoodsShoppingCart;
import com.hfkj.entity.GoodsShoppingCartExample.Criteria;
import com.hfkj.entity.GoodsShoppingCartExample.Criterion;
import com.hfkj.entity.GoodsShoppingCartExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class GoodsShoppingCartSqlProvider {
public String countByExample(GoodsShoppingCartExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("goods_shopping_cart");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(GoodsShoppingCartExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("goods_shopping_cart");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(GoodsShoppingCart record) {
SQL sql = new SQL();
sql.INSERT_INTO("goods_shopping_cart");
if (record.getGoodsId() != null) {
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getTitle() != null) {
sql.VALUES("title", "#{title,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.VALUES("img", "#{img,jdbcType=VARCHAR}");
}
if (record.getSpecsName() != null) {
sql.VALUES("specs_name", "#{specsName,jdbcType=VARCHAR}");
}
if (record.getSpecsId() != null) {
sql.VALUES("specs_id", "#{specsId,jdbcType=BIGINT}");
}
if (record.getNum() != null) {
sql.VALUES("num", "#{num,jdbcType=INTEGER}");
}
if (record.getPrice() != null) {
sql.VALUES("price", "#{price,jdbcType=DECIMAL}");
}
if (record.getWhetherCheck() != null) {
sql.VALUES("whether_check", "#{whetherCheck,jdbcType=BIT}");
}
if (record.getLoseEfficacy() != null) {
sql.VALUES("lose_efficacy", "#{loseEfficacy,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(GoodsShoppingCartExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("goods_id");
sql.SELECT("user_id");
sql.SELECT("title");
sql.SELECT("img");
sql.SELECT("specs_name");
sql.SELECT("specs_id");
sql.SELECT("num");
sql.SELECT("price");
sql.SELECT("whether_check");
sql.SELECT("lose_efficacy");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("mer_id");
sql.SELECT("mer_name");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("goods_shopping_cart");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
GoodsShoppingCart record = (GoodsShoppingCart) parameter.get("record");
GoodsShoppingCartExample example = (GoodsShoppingCartExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("goods_shopping_cart");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getTitle() != null) {
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
}
if (record.getSpecsName() != null) {
sql.SET("specs_name = #{record.specsName,jdbcType=VARCHAR}");
}
if (record.getSpecsId() != null) {
sql.SET("specs_id = #{record.specsId,jdbcType=BIGINT}");
}
if (record.getNum() != null) {
sql.SET("num = #{record.num,jdbcType=INTEGER}");
}
if (record.getPrice() != null) {
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
}
if (record.getWhetherCheck() != null) {
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
}
if (record.getLoseEfficacy() != null) {
sql.SET("lose_efficacy = #{record.loseEfficacy,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("goods_shopping_cart");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
sql.SET("specs_name = #{record.specsName,jdbcType=VARCHAR}");
sql.SET("specs_id = #{record.specsId,jdbcType=BIGINT}");
sql.SET("num = #{record.num,jdbcType=INTEGER}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
sql.SET("lose_efficacy = #{record.loseEfficacy,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
GoodsShoppingCartExample example = (GoodsShoppingCartExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(GoodsShoppingCart record) {
SQL sql = new SQL();
sql.UPDATE("goods_shopping_cart");
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getTitle() != null) {
sql.SET("title = #{title,jdbcType=VARCHAR}");
}
if (record.getImg() != null) {
sql.SET("img = #{img,jdbcType=VARCHAR}");
}
if (record.getSpecsName() != null) {
sql.SET("specs_name = #{specsName,jdbcType=VARCHAR}");
}
if (record.getSpecsId() != null) {
sql.SET("specs_id = #{specsId,jdbcType=BIGINT}");
}
if (record.getNum() != null) {
sql.SET("num = #{num,jdbcType=INTEGER}");
}
if (record.getPrice() != null) {
sql.SET("price = #{price,jdbcType=DECIMAL}");
}
if (record.getWhetherCheck() != null) {
sql.SET("whether_check = #{whetherCheck,jdbcType=BIT}");
}
if (record.getLoseEfficacy() != null) {
sql.SET("lose_efficacy = #{loseEfficacy,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, GoodsShoppingCartExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,296 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* audit_msg
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class AuditMsg implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 审核类型1产品
*/
private Integer type;
/**
* 提交对象ID
*/
private Long submitObjectId;
/**
* 提交对象名称
*/
private String submitObjectName;
/**
* 提交人名称
*/
private String submitOpName;
/**
* 提交人id
*/
private Long submitOpId;
/**
* 审核流水号
*/
private String auditSerialNo;
/**
* 审批意见
*/
private String remarks;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 审批人员id
*/
private Long auditOpId;
/**
* 审批人员名称
*/
private String auditOpName;
/**
* 状态: 0:驳回 1通过: 2:待审批
*/
private Integer status;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Long getSubmitObjectId() {
return submitObjectId;
}
public void setSubmitObjectId(Long submitObjectId) {
this.submitObjectId = submitObjectId;
}
public String getSubmitObjectName() {
return submitObjectName;
}
public void setSubmitObjectName(String submitObjectName) {
this.submitObjectName = submitObjectName;
}
public String getSubmitOpName() {
return submitOpName;
}
public void setSubmitOpName(String submitOpName) {
this.submitOpName = submitOpName;
}
public Long getSubmitOpId() {
return submitOpId;
}
public void setSubmitOpId(Long submitOpId) {
this.submitOpId = submitOpId;
}
public String getAuditSerialNo() {
return auditSerialNo;
}
public void setAuditSerialNo(String auditSerialNo) {
this.auditSerialNo = auditSerialNo;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
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 Long getAuditOpId() {
return auditOpId;
}
public void setAuditOpId(Long auditOpId) {
this.auditOpId = auditOpId;
}
public String getAuditOpName() {
return auditOpName;
}
public void setAuditOpName(String auditOpName) {
this.auditOpName = auditOpName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AuditMsg other = (AuditMsg) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getSubmitObjectId() == null ? other.getSubmitObjectId() == null : this.getSubmitObjectId().equals(other.getSubmitObjectId()))
&& (this.getSubmitObjectName() == null ? other.getSubmitObjectName() == null : this.getSubmitObjectName().equals(other.getSubmitObjectName()))
&& (this.getSubmitOpName() == null ? other.getSubmitOpName() == null : this.getSubmitOpName().equals(other.getSubmitOpName()))
&& (this.getSubmitOpId() == null ? other.getSubmitOpId() == null : this.getSubmitOpId().equals(other.getSubmitOpId()))
&& (this.getAuditSerialNo() == null ? other.getAuditSerialNo() == null : this.getAuditSerialNo().equals(other.getAuditSerialNo()))
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getAuditOpId() == null ? other.getAuditOpId() == null : this.getAuditOpId().equals(other.getAuditOpId()))
&& (this.getAuditOpName() == null ? other.getAuditOpName() == null : this.getAuditOpName().equals(other.getAuditOpName()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getSubmitObjectId() == null) ? 0 : getSubmitObjectId().hashCode());
result = prime * result + ((getSubmitObjectName() == null) ? 0 : getSubmitObjectName().hashCode());
result = prime * result + ((getSubmitOpName() == null) ? 0 : getSubmitOpName().hashCode());
result = prime * result + ((getSubmitOpId() == null) ? 0 : getSubmitOpId().hashCode());
result = prime * result + ((getAuditSerialNo() == null) ? 0 : getAuditSerialNo().hashCode());
result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getAuditOpId() == null) ? 0 : getAuditOpId().hashCode());
result = prime * result + ((getAuditOpName() == null) ? 0 : getAuditOpName().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", submitObjectId=").append(submitObjectId);
sb.append(", submitObjectName=").append(submitObjectName);
sb.append(", submitOpName=").append(submitOpName);
sb.append(", submitOpId=").append(submitOpId);
sb.append(", auditSerialNo=").append(auditSerialNo);
sb.append(", remarks=").append(remarks);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", auditOpId=").append(auditOpId);
sb.append(", auditOpName=").append(auditOpName);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,248 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* cms_content
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class CmsContent implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 编码
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 图片
*/
private String img;
/**
* 跳转类型1.小程序 2.h5 3:内部跳转
*/
private Integer jumpType;
/**
* 跳转地址
*/
private String jumpUrl;
/**
* 应用ID
*/
private String appid;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态 1 正常 0删除
*/
private Integer status;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getJumpUrl() {
return jumpUrl;
}
public void setJumpUrl(String jumpUrl) {
this.jumpUrl = jumpUrl;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
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 Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
CmsContent other = (CmsContent) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
&& (this.getJumpType() == null ? other.getJumpType() == null : this.getJumpType().equals(other.getJumpType()))
&& (this.getJumpUrl() == null ? other.getJumpUrl() == null : this.getJumpUrl().equals(other.getJumpUrl()))
&& (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
result = prime * result + ((getJumpType() == null) ? 0 : getJumpType().hashCode());
result = prime * result + ((getJumpUrl() == null) ? 0 : getJumpUrl().hashCode());
result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", name=").append(name);
sb.append(", img=").append(img);
sb.append(", jumpType=").append(jumpType);
sb.append(", jumpUrl=").append(jumpUrl);
sb.append(", appid=").append(appid);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

File diff suppressed because it is too large Load Diff

@ -18,15 +18,25 @@ public class GoodsMsg implements Serializable {
*/ */
private Long id; private Long id;
/**
* 商品分类
*/
private Long goodsType;
/** /**
* 商品类型名称 * 商品类型名称
*/ */
private String goodsTypeName; private String goodsTypeName;
/** /**
* 商品分类 * 商品分类父类
*/ */
private Long goodsType; private Long goodsTypeParent;
/**
* 商品分类父类
*/
private String goodsTypeParentName;
/** /**
* 销量 * 销量
@ -128,6 +138,14 @@ public class GoodsMsg implements Serializable {
this.id = id; this.id = id;
} }
public Long getGoodsType() {
return goodsType;
}
public void setGoodsType(Long goodsType) {
this.goodsType = goodsType;
}
public String getGoodsTypeName() { public String getGoodsTypeName() {
return goodsTypeName; return goodsTypeName;
} }
@ -136,12 +154,20 @@ public class GoodsMsg implements Serializable {
this.goodsTypeName = goodsTypeName; this.goodsTypeName = goodsTypeName;
} }
public Long getGoodsType() { public Long getGoodsTypeParent() {
return goodsType; return goodsTypeParent;
} }
public void setGoodsType(Long goodsType) { public void setGoodsTypeParent(Long goodsTypeParent) {
this.goodsType = goodsType; this.goodsTypeParent = goodsTypeParent;
}
public String getGoodsTypeParentName() {
return goodsTypeParentName;
}
public void setGoodsTypeParentName(String goodsTypeParentName) {
this.goodsTypeParentName = goodsTypeParentName;
} }
public Integer getSaleNum() { public Integer getSaleNum() {
@ -301,8 +327,10 @@ public class GoodsMsg implements Serializable {
} }
GoodsMsg other = (GoodsMsg) that; GoodsMsg other = (GoodsMsg) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName()))
&& (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType()))
&& (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName()))
&& (this.getGoodsTypeParent() == null ? other.getGoodsTypeParent() == null : this.getGoodsTypeParent().equals(other.getGoodsTypeParent()))
&& (this.getGoodsTypeParentName() == null ? other.getGoodsTypeParentName() == null : this.getGoodsTypeParentName().equals(other.getGoodsTypeParentName()))
&& (this.getSaleNum() == null ? other.getSaleNum() == null : this.getSaleNum().equals(other.getSaleNum())) && (this.getSaleNum() == null ? other.getSaleNum() == null : this.getSaleNum().equals(other.getSaleNum()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName())) && (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName()))
@ -328,8 +356,10 @@ public class GoodsMsg implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode());
result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode());
result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode());
result = prime * result + ((getGoodsTypeParent() == null) ? 0 : getGoodsTypeParent().hashCode());
result = prime * result + ((getGoodsTypeParentName() == null) ? 0 : getGoodsTypeParentName().hashCode());
result = prime * result + ((getSaleNum() == null) ? 0 : getSaleNum().hashCode()); result = prime * result + ((getSaleNum() == null) ? 0 : getSaleNum().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode()); result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode());
@ -358,8 +388,10 @@ public class GoodsMsg implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", goodsTypeName=").append(goodsTypeName);
sb.append(", goodsType=").append(goodsType); sb.append(", goodsType=").append(goodsType);
sb.append(", goodsTypeName=").append(goodsTypeName);
sb.append(", goodsTypeParent=").append(goodsTypeParent);
sb.append(", goodsTypeParentName=").append(goodsTypeParentName);
sb.append(", saleNum=").append(saleNum); sb.append(", saleNum=").append(saleNum);
sb.append(", type=").append(type); sb.append(", type=").append(type);
sb.append(", goodsBrandName=").append(goodsBrandName); sb.append(", goodsBrandName=").append(goodsBrandName);

@ -185,6 +185,66 @@ public class GoodsMsgExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeIsNull() {
addCriterion("goods_type is null");
return (Criteria) this;
}
public Criteria andGoodsTypeIsNotNull() {
addCriterion("goods_type is not null");
return (Criteria) this;
}
public Criteria andGoodsTypeEqualTo(Long value) {
addCriterion("goods_type =", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeNotEqualTo(Long value) {
addCriterion("goods_type <>", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeGreaterThan(Long value) {
addCriterion("goods_type >", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeGreaterThanOrEqualTo(Long value) {
addCriterion("goods_type >=", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeLessThan(Long value) {
addCriterion("goods_type <", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeLessThanOrEqualTo(Long value) {
addCriterion("goods_type <=", value, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeIn(List<Long> values) {
addCriterion("goods_type in", values, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeNotIn(List<Long> values) {
addCriterion("goods_type not in", values, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeBetween(Long value1, Long value2) {
addCriterion("goods_type between", value1, value2, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeNotBetween(Long value1, Long value2) {
addCriterion("goods_type not between", value1, value2, "goodsType");
return (Criteria) this;
}
public Criteria andGoodsTypeNameIsNull() { public Criteria andGoodsTypeNameIsNull() {
addCriterion("goods_type_name is null"); addCriterion("goods_type_name is null");
return (Criteria) this; return (Criteria) this;
@ -255,63 +315,133 @@ public class GoodsMsgExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeIsNull() { public Criteria andGoodsTypeParentIsNull() {
addCriterion("goods_type is null"); addCriterion("goods_type_parent is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeIsNotNull() { public Criteria andGoodsTypeParentIsNotNull() {
addCriterion("goods_type is not null"); addCriterion("goods_type_parent is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeEqualTo(Long value) { public Criteria andGoodsTypeParentEqualTo(Long value) {
addCriterion("goods_type =", value, "goodsType"); addCriterion("goods_type_parent =", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeNotEqualTo(Long value) { public Criteria andGoodsTypeParentNotEqualTo(Long value) {
addCriterion("goods_type <>", value, "goodsType"); addCriterion("goods_type_parent <>", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeGreaterThan(Long value) { public Criteria andGoodsTypeParentGreaterThan(Long value) {
addCriterion("goods_type >", value, "goodsType"); addCriterion("goods_type_parent >", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeGreaterThanOrEqualTo(Long value) { public Criteria andGoodsTypeParentGreaterThanOrEqualTo(Long value) {
addCriterion("goods_type >=", value, "goodsType"); addCriterion("goods_type_parent >=", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeLessThan(Long value) { public Criteria andGoodsTypeParentLessThan(Long value) {
addCriterion("goods_type <", value, "goodsType"); addCriterion("goods_type_parent <", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeLessThanOrEqualTo(Long value) { public Criteria andGoodsTypeParentLessThanOrEqualTo(Long value) {
addCriterion("goods_type <=", value, "goodsType"); addCriterion("goods_type_parent <=", value, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeIn(List<Long> values) { public Criteria andGoodsTypeParentIn(List<Long> values) {
addCriterion("goods_type in", values, "goodsType"); addCriterion("goods_type_parent in", values, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeNotIn(List<Long> values) { public Criteria andGoodsTypeParentNotIn(List<Long> values) {
addCriterion("goods_type not in", values, "goodsType"); addCriterion("goods_type_parent not in", values, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeBetween(Long value1, Long value2) { public Criteria andGoodsTypeParentBetween(Long value1, Long value2) {
addCriterion("goods_type between", value1, value2, "goodsType"); addCriterion("goods_type_parent between", value1, value2, "goodsTypeParent");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsTypeNotBetween(Long value1, Long value2) { public Criteria andGoodsTypeParentNotBetween(Long value1, Long value2) {
addCriterion("goods_type not between", value1, value2, "goodsType"); addCriterion("goods_type_parent not between", value1, value2, "goodsTypeParent");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameIsNull() {
addCriterion("goods_type_parent_name is null");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameIsNotNull() {
addCriterion("goods_type_parent_name is not null");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameEqualTo(String value) {
addCriterion("goods_type_parent_name =", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameNotEqualTo(String value) {
addCriterion("goods_type_parent_name <>", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameGreaterThan(String value) {
addCriterion("goods_type_parent_name >", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameGreaterThanOrEqualTo(String value) {
addCriterion("goods_type_parent_name >=", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameLessThan(String value) {
addCriterion("goods_type_parent_name <", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameLessThanOrEqualTo(String value) {
addCriterion("goods_type_parent_name <=", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameLike(String value) {
addCriterion("goods_type_parent_name like", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameNotLike(String value) {
addCriterion("goods_type_parent_name not like", value, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameIn(List<String> values) {
addCriterion("goods_type_parent_name in", values, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameNotIn(List<String> values) {
addCriterion("goods_type_parent_name not in", values, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameBetween(String value1, String value2) {
addCriterion("goods_type_parent_name between", value1, value2, "goodsTypeParentName");
return (Criteria) this;
}
public Criteria andGoodsTypeParentNameNotBetween(String value1, String value2) {
addCriterion("goods_type_parent_name not between", value1, value2, "goodsTypeParentName");
return (Criteria) this; return (Criteria) this;
} }

@ -0,0 +1,354 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* goods_shopping_cart
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class GoodsShoppingCart implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 商品编码
*/
private Long goodsId;
/**
* 用户编号
*/
private Long userId;
/**
* 商品标题
*/
private String title;
/**
* 列表描述
*/
private String img;
/**
* 规格名称
*/
private String specsName;
/**
* 规格
*/
private Long specsId;
/**
* 数量
*/
private Integer num;
/**
* 商品价格
*/
private BigDecimal price;
/**
* 是否选中
*/
private Boolean whetherCheck;
/**
* 是否失效
*/
private Boolean loseEfficacy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 商户id
*/
private Long merId;
/**
* 商户名称
*/
private String merName;
/**
* 状态1.正常 0.删除
*/
private Integer status;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getSpecsName() {
return specsName;
}
public void setSpecsName(String specsName) {
this.specsName = specsName;
}
public Long getSpecsId() {
return specsId;
}
public void setSpecsId(Long specsId) {
this.specsId = specsId;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Boolean getWhetherCheck() {
return whetherCheck;
}
public void setWhetherCheck(Boolean whetherCheck) {
this.whetherCheck = whetherCheck;
}
public Boolean getLoseEfficacy() {
return loseEfficacy;
}
public void setLoseEfficacy(Boolean loseEfficacy) {
this.loseEfficacy = loseEfficacy;
}
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 Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerName() {
return merName;
}
public void setMerName(String merName) {
this.merName = merName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
GoodsShoppingCart other = (GoodsShoppingCart) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
&& (this.getSpecsName() == null ? other.getSpecsName() == null : this.getSpecsName().equals(other.getSpecsName()))
&& (this.getSpecsId() == null ? other.getSpecsId() == null : this.getSpecsId().equals(other.getSpecsId()))
&& (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getWhetherCheck() == null ? other.getWhetherCheck() == null : this.getWhetherCheck().equals(other.getWhetherCheck()))
&& (this.getLoseEfficacy() == null ? other.getLoseEfficacy() == null : this.getLoseEfficacy().equals(other.getLoseEfficacy()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
result = prime * result + ((getSpecsName() == null) ? 0 : getSpecsName().hashCode());
result = prime * result + ((getSpecsId() == null) ? 0 : getSpecsId().hashCode());
result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getWhetherCheck() == null) ? 0 : getWhetherCheck().hashCode());
result = prime * result + ((getLoseEfficacy() == null) ? 0 : getLoseEfficacy().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", goodsId=").append(goodsId);
sb.append(", userId=").append(userId);
sb.append(", title=").append(title);
sb.append(", img=").append(img);
sb.append(", specsName=").append(specsName);
sb.append(", specsId=").append(specsId);
sb.append(", num=").append(num);
sb.append(", price=").append(price);
sb.append(", whetherCheck=").append(whetherCheck);
sb.append(", loseEfficacy=").append(loseEfficacy);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", merId=").append(merId);
sb.append(", merName=").append(merName);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,11 @@
package com.hfkj.model.audit;
import com.hfkj.entity.AuditMsg;
import com.hfkj.model.goods.GoodsModel;
import lombok.Data;
@Data
public class AuditModel extends AuditMsg {
GoodsModel goodsModel;
}

@ -10,7 +10,6 @@ import java.util.Map;
* @Description: 文件上传 * @Description: 文件上传
* @author: gongjia * @author: gongjia
* @date: 2019/10/30 11:36 * @date: 2019/10/30 11:36
* @Copyright: 2019 www.shinwoten.com Inc. All rights reserved.
*/ */
public interface FileUploadService { public interface FileUploadService {

@ -0,0 +1,64 @@
package com.hfkj.service.audit;
import com.hfkj.entity.AuditMsg;
import java.util.List;
import java.util.Map;
/**
* @ClassName: AuditMsgService
* @Description: 审核管理
* @author: gongjia
* @date: 2019/10/30 11:36
*/
public interface AuditMsgService {
/**
* @Author Sum1Dream
* @Name create
* @Description // 创建
* @Date 15:11 2024/4/19
* @Param CouponDiscount
* @return void
*/
void create(AuditMsg auditMsg);
/**
* @Author Sum1Dream
* @Name update
* @Description // 修改
* @Date 15:12 2024/4/19
* @Param CouponDiscount
* @return void
*/
void update(AuditMsg auditMsg);
/**
* @Author Sum1Dream
* @Name queryDetail
* @Description // 根据ID查询详情
* @Date 15:12 2024/4/19
* @Param id
* @return com.hfkj.entity.CouponDiscount
*/
AuditMsg queryDetail(Long id);
/**
* @Author Sum1Dream
* @Name queryDetailByMap
* @Description // 根据多条件查询
* @Date 15:12 2024/4/19
* @Param map
* @return com.hfkj.entity.CouponDiscount
*/
AuditMsg queryDetailByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name getList
* @Description // 根据多条件查询列表
* @Date 15:13 2024/4/19
* @Param map
* @return java.util.List<com.hfkj.entity.CouponDiscount>
*/
List<AuditMsg> getList(Map<String , Object> map);
}

@ -0,0 +1,58 @@
package com.hfkj.service.audit.impl;
import com.hfkj.dao.AuditMsgMapper;
import com.hfkj.entity.AuditMsg;
import com.hfkj.entity.AuditMsgExample;
import com.hfkj.service.audit.AuditMsgService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@Service("auditMsgService")
public class AuditMsgServiceImpl implements AuditMsgService {
@Resource
private AuditMsgMapper auditMsgMapper;
@Override
public void create(AuditMsg auditMsg) {
auditMsgMapper.insert(auditMsg);
}
@Override
public void update(AuditMsg auditMsg) {
auditMsgMapper.updateByPrimaryKeySelective(auditMsg);
}
@Override
public AuditMsg queryDetail(Long id) {
return auditMsgMapper.selectByPrimaryKey(id);
}
@Override
public AuditMsg queryDetailByMap(Map<String, Object> map) {
return null;
}
@Override
public List<AuditMsg> getList(Map<String, Object> map) {
AuditMsgExample example = new AuditMsgExample();
AuditMsgExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(map, "submitObjectName"))) {
criteria.andSubmitObjectNameLike("%"+MapUtils.getString(map, "submitObjectName")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "submitOpName"))) {
criteria.andSubmitOpNameLike("%"+MapUtils.getString(map, "submitOpName")+"%");
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
return auditMsgMapper.selectByExample(example) ;
}
}

@ -0,0 +1,71 @@
package com.hfkj.service.cms;
import com.hfkj.entity.CmsContent;
import com.hfkj.entity.GoodsMsg;
import java.util.List;
import java.util.Map;
public interface CmsContentService {
/**
* @Author Sum1Dream
* @Name create
* @Description // 创建
* @Date 15:11 2024/4/19
* @Param GoodsMsg
* @return void
*/
void create(CmsContent cmsContent);
/**
* @Author Sum1Dream
* @Name update
* @Description // 修改
* @Date 15:12 2024/4/19
* @Param GoodsMsg
* @return void
*/
void update(CmsContent cmsContent);
/**
* @Author Sum1Dream
* @Name delete
* @Description // 修改
* @Date 15:12 2024/4/19
* @Param id
* @return void
*/
void delete(Long id , Boolean fullDelete);
/**
* @Author Sum1Dream
* @Name queryDetail
* @Description // 根据ID查询产品类型详情
* @Date 15:12 2024/4/19
* @Param id
* @return com.hfkj.entity.GoodsMsg
*/
CmsContent queryDetail(Long id);
/**
* @Author Sum1Dream
* @Name queryDetailByMap
* @Description // 根据多条件查询产品类型
* @Date 15:12 2024/4/19
* @Param map
* @return com.hfkj.entity.GoodsMsg
*/
CmsContent queryDetailByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name getList
* @Description // 根据多条件查询列表
* @Date 15:13 2024/4/19
* @Param map
* @return java.util.List<com.hfkj.entity.GoodsMsg>
*/
List<CmsContent> getList(Map<String , Object> map);
}

@ -0,0 +1,57 @@
package com.hfkj.service.cms.impl;
import com.hfkj.dao.CmsContentMapper;
import com.hfkj.entity.CmsContent;
import com.hfkj.entity.CmsContentExample;
import com.hfkj.service.cms.CmsContentService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("cmsContentService")
public class CmsContentServiceImpl implements CmsContentService {
@Resource
private CmsContentMapper cmsContentMapper;
@Override
public void create(CmsContent cmsContent) {
cmsContentMapper.insert(cmsContent);
}
@Override
public void update(CmsContent cmsContent) {
cmsContentMapper.updateByPrimaryKeySelective(cmsContent);
}
@Override
public void delete(Long id, Boolean fullDelete) {
cmsContentMapper.deleteByPrimaryKey(id);
}
@Override
public CmsContent queryDetail(Long id) {
return cmsContentMapper.selectByPrimaryKey(id);
}
@Override
public CmsContent queryDetailByMap(Map<String, Object> map) {
return null;
}
@Override
public List<CmsContent> getList(Map<String, Object> map) {
CmsContentExample example = new CmsContentExample();
CmsContentExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(map, "code"))) {
criteria.andCodeEqualTo(MapUtils.getString(map, "code"));
}
return cmsContentMapper.selectByExample(example);
}
}

@ -74,4 +74,5 @@ public interface GoodsMsgService {
* @return java.util.List<com.hfkj.entity.GoodsMsg> * @return java.util.List<com.hfkj.entity.GoodsMsg>
*/ */
List<GoodsMsg> getList(Map<String , Object> map); List<GoodsMsg> getList(Map<String , Object> map);
} }

@ -61,6 +61,9 @@ public class GoodsMsgServiceImpl implements GoodsMsgService {
if (MapUtils.getLong(map, "goodsType") != null) { if (MapUtils.getLong(map, "goodsType") != null) {
criteria.andGoodsTypeEqualTo(MapUtils.getLong(map, "goodsType")); criteria.andGoodsTypeEqualTo(MapUtils.getLong(map, "goodsType"));
} }
if (MapUtils.getLong(map, "goodsTypeParent") != null) {
criteria.andGoodsTypeParentEqualTo(MapUtils.getLong(map, "goodsTypeParent"));
}
if (MapUtils.getInteger(map, "type") != null) { if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
} }

Loading…
Cancel
Save