parent
3140daf275
commit
65727d1a57
@ -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); |
||||
} |
||||
} |
||||
|
||||
} |
@ -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); |
||||
} |
||||
} |
||||
|
||||
} |
@ -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; |
||||
} |
||||
|
||||
} |
@ -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()); |
||||
} |
||||
} |
||||
} |
@ -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
@ -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(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -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; |
||||
} |
@ -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); |
||||
} |
||||
} |
Loading…
Reference in new issue