Merge branch 'order' of http://139.159.177.244:3000/hurui/hai-server into order
commit
2650933acb
@ -0,0 +1,130 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.SessionObject; |
||||
import com.hai.common.security.UserCenter; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.BsMsg; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.model.UserInfoModel; |
||||
import com.hai.service.BsMsgService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author sum1dream |
||||
*/ |
||||
@Controller |
||||
@RequestMapping(value = "/bsMsg") |
||||
@Api(value = "站内信") |
||||
public class BsMsgController { |
||||
|
||||
Logger log = LoggerFactory.getLogger(ApiProductController.class); |
||||
|
||||
@Resource |
||||
private BsMsgService bsMsgService; |
||||
|
||||
@Autowired |
||||
private UserCenter userCenter; |
||||
|
||||
@RequestMapping(value = "/getMsgByList", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询站内信列表") |
||||
public ResponseData getMsgByList( |
||||
@RequestParam(value = "type", required = false) Integer type, |
||||
@RequestParam(value = "jumpType", required = false) Integer jumpType, |
||||
@RequestParam(value = "msgType", required = false) Integer msgType, |
||||
@RequestParam(value = "title", required = false) String title, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request |
||||
) { |
||||
try { |
||||
|
||||
SessionObject sessionObject = userCenter.getSessionObject(request); |
||||
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
||||
|
||||
Map<String, Object> map = new HashMap<>(5); |
||||
|
||||
map.put("type", type); |
||||
map.put("jumpType", jumpType); |
||||
map.put("msgType", msgType); |
||||
map.put("title", title); |
||||
map.put("companyId" , userInfoModel.getBsCompany().getId()); |
||||
|
||||
PageHelper.startPage(pageNum,pageSize); |
||||
|
||||
List<BsMsg> list = bsMsgService.getMsgByList(map); |
||||
return ResponseMsgUtil.success(new PageInfo<>(list)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("BsMsgController --> getMsgByList() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "insertMsg" , method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "新增站内信") |
||||
public ResponseData insertMsg(@RequestBody BsMsg bsMsg , HttpServletRequest request) { |
||||
try { |
||||
|
||||
SessionObject sessionObject = userCenter.getSessionObject(request); |
||||
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
||||
|
||||
bsMsg.setCompanyId(userInfoModel.getBsCompany().getId()); |
||||
bsMsg.setOpId(userInfoModel.getSecUser().getId()); |
||||
bsMsg.setOpName(userInfoModel.getSecUser().getUserName()); |
||||
bsMsg.setMsgType(2); |
||||
bsMsg.setStatus(1); |
||||
bsMsg.setCreateTime(new Date()); |
||||
bsMsg.setUpdateTime(new Date()); |
||||
bsMsgService.insertMsg(bsMsg , null); |
||||
return ResponseMsgUtil.success("新增成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("BsMsgController --> insertMsg() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/pushMsg", method = RequestMethod.GET) |
||||
@ApiOperation(value = "发布站内信") |
||||
@ResponseBody |
||||
public ResponseData pushMsg(@RequestParam(value = "id", required = true) Long id) { |
||||
try { |
||||
|
||||
BsMsg bsMsg = bsMsgService.findMsg(id); |
||||
if (bsMsg == null) { |
||||
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR, "为查询到相关内容!"); |
||||
} |
||||
|
||||
if (bsMsg.getStatus() !=1) { |
||||
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "当前状态错误"); |
||||
} |
||||
|
||||
bsMsg.setStatus(2); |
||||
bsMsg.setUpdateTime(new Date()); |
||||
bsMsgService.updateMsg(bsMsg); |
||||
return ResponseMsgUtil.success("发布成功"); |
||||
} catch (Exception e) { |
||||
log.error("CmsContentController --> delContent() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,58 @@ |
||||
package com.hai.config; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.HighCoupon; |
||||
import com.hai.enum_type.CmsContentDataEnum; |
||||
import com.hai.service.HighCouponService; |
||||
import com.hai.service.HighDiscountPackageService; |
||||
import com.itextpdf.tool.xml.html.head.Title; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @serviceName QrCodeUtilsConfig.java |
||||
* @author Sum1Dream |
||||
* @version 1.0.0 |
||||
* @Description // CMS内容工具
|
||||
* @createTime 09:54 2022/4/13 |
||||
**/ |
||||
@Configuration |
||||
public class CmsContentConfig { |
||||
|
||||
@Resource |
||||
private HighCouponService highCouponService; |
||||
|
||||
@Resource |
||||
private HighDiscountPackageService highDiscountPackageService; |
||||
|
||||
public Object getCmsContentData(String title , Long companyId) throws Exception { |
||||
|
||||
Map<String , Object> map = new HashMap<>(); |
||||
// 判断是否是天天好券
|
||||
if (CmsContentDataEnum.DISCOUNT.getName().equals(title)) { |
||||
map.put("companyId", companyId); |
||||
map.put("salesType" , 1); |
||||
map.put("status" , 1); |
||||
PageHelper.startPage(1, 3); |
||||
return new PageInfo<>( highDiscountPackageService.getDiscountPackageList(map)).getList(); |
||||
} else { |
||||
map.put("companyId", companyId); |
||||
map.put("displayArea", CmsContentDataEnum.getTypeByName(title)); |
||||
map.put("notCouponSource", 2); |
||||
map.put("status", 2); |
||||
PageHelper.startPage(1, 3); |
||||
return new PageInfo<>(highCouponService.getCouponList(map)).getList(); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,146 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsMsg; |
||||
import com.hai.entity.BsMsgExample; |
||||
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 BsMsgMapper extends BsMsgMapperExt { |
||||
@SelectProvider(type=BsMsgSqlProvider.class, method="countByExample") |
||||
long countByExample(BsMsgExample example); |
||||
|
||||
@DeleteProvider(type=BsMsgSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsMsgExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_msg", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_msg (title, `type`, ", |
||||
"jump_type, msg_type, ", |
||||
"object_id, image, ", |
||||
"content, update_time, ", |
||||
"op_name, company_id, ", |
||||
"create_time, op_id, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{title,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, ", |
||||
"#{jumpType,jdbcType=INTEGER}, #{msgType,jdbcType=INTEGER}, ", |
||||
"#{objectId,jdbcType=BIGINT}, #{image,jdbcType=VARCHAR}, ", |
||||
"#{content,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{opName,jdbcType=VARCHAR}, #{companyId,jdbcType=BIGINT}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsMsg record); |
||||
|
||||
@InsertProvider(type=BsMsgSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsMsg record); |
||||
|
||||
@SelectProvider(type=BsMsgSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="msg_type", property="msgType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@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<BsMsg> selectByExample(BsMsgExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, title, `type`, jump_type, msg_type, object_id, image, content, update_time, ", |
||||
"op_name, company_id, create_time, op_id, `status`, ext_1, ext_2, ext_3", |
||||
"from bs_msg", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="msg_type", property="msgType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), |
||||
@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) |
||||
}) |
||||
BsMsg selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsMsgSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsMsg record, @Param("example") BsMsgExample example); |
||||
|
||||
@UpdateProvider(type=BsMsgSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsMsg record, @Param("example") BsMsgExample example); |
||||
|
||||
@UpdateProvider(type=BsMsgSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsMsg record); |
||||
|
||||
@Update({ |
||||
"update bs_msg", |
||||
"set title = #{title,jdbcType=VARCHAR},", |
||||
"`type` = #{type,jdbcType=INTEGER},", |
||||
"jump_type = #{jumpType,jdbcType=INTEGER},", |
||||
"msg_type = #{msgType,jdbcType=INTEGER},", |
||||
"object_id = #{objectId,jdbcType=BIGINT},", |
||||
"image = #{image,jdbcType=VARCHAR},", |
||||
"content = #{content,jdbcType=VARCHAR},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"op_name = #{opName,jdbcType=VARCHAR},", |
||||
"company_id = #{companyId,jdbcType=BIGINT},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"op_id = #{opId,jdbcType=BIGINT},", |
||||
"`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(BsMsg record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsMsgMapperExt { |
||||
} |
@ -0,0 +1,402 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsMsg; |
||||
import com.hai.entity.BsMsgExample.Criteria; |
||||
import com.hai.entity.BsMsgExample.Criterion; |
||||
import com.hai.entity.BsMsgExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsMsgSqlProvider { |
||||
|
||||
public String countByExample(BsMsgExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_msg"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsMsgExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_msg"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsMsg record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_msg"); |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getJumpType() != null) { |
||||
sql.VALUES("jump_type", "#{jumpType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMsgType() != null) { |
||||
sql.VALUES("msg_type", "#{msgType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getObjectId() != null) { |
||||
sql.VALUES("object_id", "#{objectId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getImage() != null) { |
||||
sql.VALUES("image", "#{image,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContent() != null) { |
||||
sql.VALUES("content", "#{content,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
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(BsMsgExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("title"); |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("jump_type"); |
||||
sql.SELECT("msg_type"); |
||||
sql.SELECT("object_id"); |
||||
sql.SELECT("image"); |
||||
sql.SELECT("content"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_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) { |
||||
BsMsg record = (BsMsg) parameter.get("record"); |
||||
BsMsgExample example = (BsMsgExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_msg"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getJumpType() != null) { |
||||
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMsgType() != null) { |
||||
sql.SET("msg_type = #{record.msgType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getObjectId() != null) { |
||||
sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getImage() != null) { |
||||
sql.SET("image = #{record.image,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContent() != null) { |
||||
sql.SET("content = #{record.content,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
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("bs_msg"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); |
||||
sql.SET("msg_type = #{record.msgType,jdbcType=INTEGER}"); |
||||
sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}"); |
||||
sql.SET("image = #{record.image,jdbcType=VARCHAR}"); |
||||
sql.SET("content = #{record.content,jdbcType=VARCHAR}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
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}"); |
||||
|
||||
BsMsgExample example = (BsMsgExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsMsg record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_msg"); |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getJumpType() != null) { |
||||
sql.SET("jump_type = #{jumpType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMsgType() != null) { |
||||
sql.SET("msg_type = #{msgType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getObjectId() != null) { |
||||
sql.SET("object_id = #{objectId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getImage() != null) { |
||||
sql.SET("image = #{image,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContent() != null) { |
||||
sql.SET("content = #{content,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
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, BsMsgExample 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,125 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsMsgUser; |
||||
import com.hai.entity.BsMsgUserExample; |
||||
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 BsMsgUserMapper extends BsMsgUserMapperExt { |
||||
@SelectProvider(type=BsMsgUserSqlProvider.class, method="countByExample") |
||||
long countByExample(BsMsgUserExample example); |
||||
|
||||
@DeleteProvider(type=BsMsgUserSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsMsgUserExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_msg_user", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_msg_user (msg_id, user_id, ", |
||||
"user_name, user_phone, ", |
||||
"where_check, check_time, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{msgId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", |
||||
"#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ", |
||||
"#{whereCheck,jdbcType=BIT}, #{checkTime,jdbcType=TIMESTAMP}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsMsgUser record); |
||||
|
||||
@InsertProvider(type=BsMsgUserSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsMsgUser record); |
||||
|
||||
@SelectProvider(type=BsMsgUserSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="msg_id", property="msgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="where_check", property="whereCheck", jdbcType=JdbcType.BIT), |
||||
@Result(column="check_time", property="checkTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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<BsMsgUser> selectByExample(BsMsgUserExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, msg_id, user_id, user_name, user_phone, where_check, check_time, create_time, ", |
||||
"update_time, ext_1, ext_2, ext_3", |
||||
"from bs_msg_user", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="msg_id", property="msgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="where_check", property="whereCheck", jdbcType=JdbcType.BIT), |
||||
@Result(column="check_time", property="checkTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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) |
||||
}) |
||||
BsMsgUser selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsMsgUserSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsMsgUser record, @Param("example") BsMsgUserExample example); |
||||
|
||||
@UpdateProvider(type=BsMsgUserSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsMsgUser record, @Param("example") BsMsgUserExample example); |
||||
|
||||
@UpdateProvider(type=BsMsgUserSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsMsgUser record); |
||||
|
||||
@Update({ |
||||
"update bs_msg_user", |
||||
"set msg_id = #{msgId,jdbcType=BIGINT},", |
||||
"user_id = #{userId,jdbcType=BIGINT},", |
||||
"user_name = #{userName,jdbcType=VARCHAR},", |
||||
"user_phone = #{userPhone,jdbcType=VARCHAR},", |
||||
"where_check = #{whereCheck,jdbcType=BIT},", |
||||
"check_time = #{checkTime,jdbcType=TIMESTAMP},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsMsgUser record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsMsgUserMapperExt { |
||||
} |
@ -0,0 +1,332 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsMsgUser; |
||||
import com.hai.entity.BsMsgUserExample.Criteria; |
||||
import com.hai.entity.BsMsgUserExample.Criterion; |
||||
import com.hai.entity.BsMsgUserExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsMsgUserSqlProvider { |
||||
|
||||
public String countByExample(BsMsgUserExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_msg_user"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsMsgUserExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_msg_user"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsMsgUser record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_msg_user"); |
||||
|
||||
if (record.getMsgId() != null) { |
||||
sql.VALUES("msg_id", "#{msgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserName() != null) { |
||||
sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhereCheck() != null) { |
||||
sql.VALUES("where_check", "#{whereCheck,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getCheckTime() != null) { |
||||
sql.VALUES("check_time", "#{checkTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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(BsMsgUserExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("msg_id"); |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("user_name"); |
||||
sql.SELECT("user_phone"); |
||||
sql.SELECT("where_check"); |
||||
sql.SELECT("check_time"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_msg_user"); |
||||
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) { |
||||
BsMsgUser record = (BsMsgUser) parameter.get("record"); |
||||
BsMsgUserExample example = (BsMsgUserExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_msg_user"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMsgId() != null) { |
||||
sql.SET("msg_id = #{record.msgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserName() != null) { |
||||
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhereCheck() != null) { |
||||
sql.SET("where_check = #{record.whereCheck,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getCheckTime() != null) { |
||||
sql.SET("check_time = #{record.checkTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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.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("bs_msg_user"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("msg_id = #{record.msgId,jdbcType=BIGINT}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("where_check = #{record.whereCheck,jdbcType=BIT}"); |
||||
sql.SET("check_time = #{record.checkTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
BsMsgUserExample example = (BsMsgUserExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsMsgUser record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_msg_user"); |
||||
|
||||
if (record.getMsgId() != null) { |
||||
sql.SET("msg_id = #{msgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserName() != null) { |
||||
sql.SET("user_name = #{userName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhereCheck() != null) { |
||||
sql.SET("where_check = #{whereCheck,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getCheckTime() != null) { |
||||
sql.SET("check_time = #{checkTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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, BsMsgUserExample 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,321 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_msg |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsMsg implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 标题 |
||||
*/ |
||||
private String title; |
||||
|
||||
/** |
||||
* 类型 1:服务通知 2:支付信息 3:客服信息 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 跳转类型 1 订单详情 2 外部链接 3 内部链接 4 客服信息 |
||||
*/ |
||||
private Integer jumpType; |
||||
|
||||
/** |
||||
* 消息类型:1 个人信息 2 全局信息 |
||||
*/ |
||||
private Integer msgType; |
||||
|
||||
/** |
||||
* 对象id |
||||
*/ |
||||
private Long objectId; |
||||
|
||||
/** |
||||
* 展示图片 |
||||
*/ |
||||
private String image; |
||||
|
||||
/** |
||||
* 信息内容 |
||||
*/ |
||||
private String content; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 操作人员名称 |
||||
*/ |
||||
private String opName; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人员 |
||||
*/ |
||||
private Long opId; |
||||
|
||||
/** |
||||
* 1:编辑中 2:发布 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 String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Integer getJumpType() { |
||||
return jumpType; |
||||
} |
||||
|
||||
public void setJumpType(Integer jumpType) { |
||||
this.jumpType = jumpType; |
||||
} |
||||
|
||||
public Integer getMsgType() { |
||||
return msgType; |
||||
} |
||||
|
||||
public void setMsgType(Integer msgType) { |
||||
this.msgType = msgType; |
||||
} |
||||
|
||||
public Long getObjectId() { |
||||
return objectId; |
||||
} |
||||
|
||||
public void setObjectId(Long objectId) { |
||||
this.objectId = objectId; |
||||
} |
||||
|
||||
public String getImage() { |
||||
return image; |
||||
} |
||||
|
||||
public void setImage(String image) { |
||||
this.image = image; |
||||
} |
||||
|
||||
public String getContent() { |
||||
return content; |
||||
} |
||||
|
||||
public void setContent(String content) { |
||||
this.content = content; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getOpName() { |
||||
return opName; |
||||
} |
||||
|
||||
public void setOpName(String opName) { |
||||
this.opName = opName; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Long getOpId() { |
||||
return opId; |
||||
} |
||||
|
||||
public void setOpId(Long opId) { |
||||
this.opId = opId; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
BsMsg other = (BsMsg) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getJumpType() == null ? other.getJumpType() == null : this.getJumpType().equals(other.getJumpType())) |
||||
&& (this.getMsgType() == null ? other.getMsgType() == null : this.getMsgType().equals(other.getMsgType())) |
||||
&& (this.getObjectId() == null ? other.getObjectId() == null : this.getObjectId().equals(other.getObjectId())) |
||||
&& (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage())) |
||||
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) |
||||
&& (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 + ((getTitle() == null) ? 0 : getTitle().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getJumpType() == null) ? 0 : getJumpType().hashCode()); |
||||
result = prime * result + ((getMsgType() == null) ? 0 : getMsgType().hashCode()); |
||||
result = prime * result + ((getObjectId() == null) ? 0 : getObjectId().hashCode()); |
||||
result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode()); |
||||
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getOpName() == null) ? 0 : getOpName().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpId() == null) ? 0 : getOpId().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(", title=").append(title); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", jumpType=").append(jumpType); |
||||
sb.append(", msgType=").append(msgType); |
||||
sb.append(", objectId=").append(objectId); |
||||
sb.append(", image=").append(image); |
||||
sb.append(", content=").append(content); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", opName=").append(opName); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opId=").append(opId); |
||||
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,241 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_msg_user |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsMsgUser implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 站内信id |
||||
*/ |
||||
private Long msgId; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 用户名称 |
||||
*/ |
||||
private String userName; |
||||
|
||||
/** |
||||
* 用户电话 |
||||
*/ |
||||
private String userPhone; |
||||
|
||||
/** |
||||
* 是否查看 |
||||
*/ |
||||
private Boolean whereCheck; |
||||
|
||||
/** |
||||
* 查看时间 |
||||
*/ |
||||
private Date checkTime; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 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 getMsgId() { |
||||
return msgId; |
||||
} |
||||
|
||||
public void setMsgId(Long msgId) { |
||||
this.msgId = msgId; |
||||
} |
||||
|
||||
public Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public String getUserName() { |
||||
return userName; |
||||
} |
||||
|
||||
public void setUserName(String userName) { |
||||
this.userName = userName; |
||||
} |
||||
|
||||
public String getUserPhone() { |
||||
return userPhone; |
||||
} |
||||
|
||||
public void setUserPhone(String userPhone) { |
||||
this.userPhone = userPhone; |
||||
} |
||||
|
||||
public Boolean getWhereCheck() { |
||||
return whereCheck; |
||||
} |
||||
|
||||
public void setWhereCheck(Boolean whereCheck) { |
||||
this.whereCheck = whereCheck; |
||||
} |
||||
|
||||
public Date getCheckTime() { |
||||
return checkTime; |
||||
} |
||||
|
||||
public void setCheckTime(Date checkTime) { |
||||
this.checkTime = checkTime; |
||||
} |
||||
|
||||
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 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; |
||||
} |
||||
BsMsgUser other = (BsMsgUser) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getMsgId() == null ? other.getMsgId() == null : this.getMsgId().equals(other.getMsgId())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) |
||||
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) |
||||
&& (this.getWhereCheck() == null ? other.getWhereCheck() == null : this.getWhereCheck().equals(other.getWhereCheck())) |
||||
&& (this.getCheckTime() == null ? other.getCheckTime() == null : this.getCheckTime().equals(other.getCheckTime())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (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 + ((getMsgId() == null) ? 0 : getMsgId().hashCode()); |
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); |
||||
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); |
||||
result = prime * result + ((getWhereCheck() == null) ? 0 : getWhereCheck().hashCode()); |
||||
result = prime * result + ((getCheckTime() == null) ? 0 : getCheckTime().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", msgId=").append(msgId); |
||||
sb.append(", userId=").append(userId); |
||||
sb.append(", userName=").append(userName); |
||||
sb.append(", userPhone=").append(userPhone); |
||||
sb.append(", whereCheck=").append(whereCheck); |
||||
sb.append(", checkTime=").append(checkTime); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,993 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class BsMsgUserExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public BsMsgUserExample() { |
||||
oredCriteria = new ArrayList<Criteria>(); |
||||
} |
||||
|
||||
public void setOrderByClause(String orderByClause) { |
||||
this.orderByClause = orderByClause; |
||||
} |
||||
|
||||
public String getOrderByClause() { |
||||
return orderByClause; |
||||
} |
||||
|
||||
public void setDistinct(boolean distinct) { |
||||
this.distinct = distinct; |
||||
} |
||||
|
||||
public boolean isDistinct() { |
||||
return distinct; |
||||
} |
||||
|
||||
public List<Criteria> getOredCriteria() { |
||||
return oredCriteria; |
||||
} |
||||
|
||||
public void or(Criteria criteria) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
|
||||
public Criteria or() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
oredCriteria.add(criteria); |
||||
return criteria; |
||||
} |
||||
|
||||
public Criteria createCriteria() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
if (oredCriteria.size() == 0) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
return criteria; |
||||
} |
||||
|
||||
protected Criteria createCriteriaInternal() { |
||||
Criteria criteria = new Criteria(); |
||||
return criteria; |
||||
} |
||||
|
||||
public void clear() { |
||||
oredCriteria.clear(); |
||||
orderByClause = null; |
||||
distinct = false; |
||||
} |
||||
|
||||
public void setLimit(Integer limit) { |
||||
this.limit = limit; |
||||
} |
||||
|
||||
public Integer getLimit() { |
||||
return limit; |
||||
} |
||||
|
||||
public void setOffset(Long offset) { |
||||
this.offset = offset; |
||||
} |
||||
|
||||
public Long getOffset() { |
||||
return offset; |
||||
} |
||||
|
||||
protected abstract static class GeneratedCriteria { |
||||
protected List<Criterion> criteria; |
||||
|
||||
protected GeneratedCriteria() { |
||||
super(); |
||||
criteria = new ArrayList<Criterion>(); |
||||
} |
||||
|
||||
public boolean isValid() { |
||||
return criteria.size() > 0; |
||||
} |
||||
|
||||
public List<Criterion> getAllCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
public List<Criterion> getCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
protected void addCriterion(String condition) { |
||||
if (condition == null) { |
||||
throw new RuntimeException("Value for condition cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value, String property) { |
||||
if (value == null) { |
||||
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
if (value1 == null || value2 == null) { |
||||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value1, value2)); |
||||
} |
||||
|
||||
public Criteria andIdIsNull() { |
||||
addCriterion("id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIsNotNull() { |
||||
addCriterion("id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdEqualTo(Long value) { |
||||
addCriterion("id =", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotEqualTo(Long value) { |
||||
addCriterion("id <>", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThan(Long value) { |
||||
addCriterion("id >", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("id >=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThan(Long value) { |
||||
addCriterion("id <", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("id <=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIn(List<Long> values) { |
||||
addCriterion("id in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotIn(List<Long> values) { |
||||
addCriterion("id not in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) { |
||||
addCriterion("id between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("id not between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdIsNull() { |
||||
addCriterion("msg_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdIsNotNull() { |
||||
addCriterion("msg_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdEqualTo(Long value) { |
||||
addCriterion("msg_id =", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdNotEqualTo(Long value) { |
||||
addCriterion("msg_id <>", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdGreaterThan(Long value) { |
||||
addCriterion("msg_id >", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("msg_id >=", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdLessThan(Long value) { |
||||
addCriterion("msg_id <", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("msg_id <=", value, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdIn(List<Long> values) { |
||||
addCriterion("msg_id in", values, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdNotIn(List<Long> values) { |
||||
addCriterion("msg_id not in", values, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdBetween(Long value1, Long value2) { |
||||
addCriterion("msg_id between", value1, value2, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMsgIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("msg_id not between", value1, value2, "msgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdIsNull() { |
||||
addCriterion("user_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdIsNotNull() { |
||||
addCriterion("user_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdEqualTo(Long value) { |
||||
addCriterion("user_id =", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdNotEqualTo(Long value) { |
||||
addCriterion("user_id <>", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdGreaterThan(Long value) { |
||||
addCriterion("user_id >", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("user_id >=", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdLessThan(Long value) { |
||||
addCriterion("user_id <", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("user_id <=", value, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdIn(List<Long> values) { |
||||
addCriterion("user_id in", values, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdNotIn(List<Long> values) { |
||||
addCriterion("user_id not in", values, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
addCriterion("user_id between", value1, value2, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("user_id not between", value1, value2, "userId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameIsNull() { |
||||
addCriterion("user_name is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameIsNotNull() { |
||||
addCriterion("user_name is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameEqualTo(String value) { |
||||
addCriterion("user_name =", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameNotEqualTo(String value) { |
||||
addCriterion("user_name <>", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameGreaterThan(String value) { |
||||
addCriterion("user_name >", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameGreaterThanOrEqualTo(String value) { |
||||
addCriterion("user_name >=", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameLessThan(String value) { |
||||
addCriterion("user_name <", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameLessThanOrEqualTo(String value) { |
||||
addCriterion("user_name <=", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameLike(String value) { |
||||
addCriterion("user_name like", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameNotLike(String value) { |
||||
addCriterion("user_name not like", value, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameIn(List<String> values) { |
||||
addCriterion("user_name in", values, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameNotIn(List<String> values) { |
||||
addCriterion("user_name not in", values, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameBetween(String value1, String value2) { |
||||
addCriterion("user_name between", value1, value2, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserNameNotBetween(String value1, String value2) { |
||||
addCriterion("user_name not between", value1, value2, "userName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneIsNull() { |
||||
addCriterion("user_phone is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneIsNotNull() { |
||||
addCriterion("user_phone is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneEqualTo(String value) { |
||||
addCriterion("user_phone =", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneNotEqualTo(String value) { |
||||
addCriterion("user_phone <>", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneGreaterThan(String value) { |
||||
addCriterion("user_phone >", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneGreaterThanOrEqualTo(String value) { |
||||
addCriterion("user_phone >=", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneLessThan(String value) { |
||||
addCriterion("user_phone <", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneLessThanOrEqualTo(String value) { |
||||
addCriterion("user_phone <=", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneLike(String value) { |
||||
addCriterion("user_phone like", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneNotLike(String value) { |
||||
addCriterion("user_phone not like", value, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneIn(List<String> values) { |
||||
addCriterion("user_phone in", values, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneNotIn(List<String> values) { |
||||
addCriterion("user_phone not in", values, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneBetween(String value1, String value2) { |
||||
addCriterion("user_phone between", value1, value2, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUserPhoneNotBetween(String value1, String value2) { |
||||
addCriterion("user_phone not between", value1, value2, "userPhone"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckIsNull() { |
||||
addCriterion("where_check is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckIsNotNull() { |
||||
addCriterion("where_check is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckEqualTo(Boolean value) { |
||||
addCriterion("where_check =", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckNotEqualTo(Boolean value) { |
||||
addCriterion("where_check <>", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckGreaterThan(Boolean value) { |
||||
addCriterion("where_check >", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckGreaterThanOrEqualTo(Boolean value) { |
||||
addCriterion("where_check >=", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckLessThan(Boolean value) { |
||||
addCriterion("where_check <", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckLessThanOrEqualTo(Boolean value) { |
||||
addCriterion("where_check <=", value, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckIn(List<Boolean> values) { |
||||
addCriterion("where_check in", values, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckNotIn(List<Boolean> values) { |
||||
addCriterion("where_check not in", values, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckBetween(Boolean value1, Boolean value2) { |
||||
addCriterion("where_check between", value1, value2, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andWhereCheckNotBetween(Boolean value1, Boolean value2) { |
||||
addCriterion("where_check not between", value1, value2, "whereCheck"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeIsNull() { |
||||
addCriterion("check_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeIsNotNull() { |
||||
addCriterion("check_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeEqualTo(Date value) { |
||||
addCriterion("check_time =", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeNotEqualTo(Date value) { |
||||
addCriterion("check_time <>", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeGreaterThan(Date value) { |
||||
addCriterion("check_time >", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("check_time >=", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeLessThan(Date value) { |
||||
addCriterion("check_time <", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("check_time <=", value, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeIn(List<Date> values) { |
||||
addCriterion("check_time in", values, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeNotIn(List<Date> values) { |
||||
addCriterion("check_time not in", values, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeBetween(Date value1, Date value2) { |
||||
addCriterion("check_time between", value1, value2, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCheckTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("check_time not between", value1, value2, "checkTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNull() { |
||||
addCriterion("ext_1 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNotNull() { |
||||
addCriterion("ext_1 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1EqualTo(String value) { |
||||
addCriterion("ext_1 =", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotEqualTo(String value) { |
||||
addCriterion("ext_1 <>", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThan(String value) { |
||||
addCriterion("ext_1 >", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 >=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThan(String value) { |
||||
addCriterion("ext_1 <", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 <=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Like(String value) { |
||||
addCriterion("ext_1 like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotLike(String value) { |
||||
addCriterion("ext_1 not like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1In(List<String> values) { |
||||
addCriterion("ext_1 in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotIn(List<String> values) { |
||||
addCriterion("ext_1 not in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Between(String value1, String value2) { |
||||
addCriterion("ext_1 between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotBetween(String value1, String value2) { |
||||
addCriterion("ext_1 not between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNull() { |
||||
addCriterion("ext_2 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNotNull() { |
||||
addCriterion("ext_2 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2EqualTo(String value) { |
||||
addCriterion("ext_2 =", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotEqualTo(String value) { |
||||
addCriterion("ext_2 <>", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThan(String value) { |
||||
addCriterion("ext_2 >", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 >=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThan(String value) { |
||||
addCriterion("ext_2 <", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 <=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Like(String value) { |
||||
addCriterion("ext_2 like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotLike(String value) { |
||||
addCriterion("ext_2 not like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2In(List<String> values) { |
||||
addCriterion("ext_2 in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotIn(List<String> values) { |
||||
addCriterion("ext_2 not in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Between(String value1, String value2) { |
||||
addCriterion("ext_2 between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotBetween(String value1, String value2) { |
||||
addCriterion("ext_2 not between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNull() { |
||||
addCriterion("ext_3 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNotNull() { |
||||
addCriterion("ext_3 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3EqualTo(String value) { |
||||
addCriterion("ext_3 =", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotEqualTo(String value) { |
||||
addCriterion("ext_3 <>", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThan(String value) { |
||||
addCriterion("ext_3 >", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 >=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThan(String value) { |
||||
addCriterion("ext_3 <", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 <=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Like(String value) { |
||||
addCriterion("ext_3 like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotLike(String value) { |
||||
addCriterion("ext_3 not like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3In(List<String> values) { |
||||
addCriterion("ext_3 in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotIn(List<String> values) { |
||||
addCriterion("ext_3 not in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Between(String value1, String value2) { |
||||
addCriterion("ext_3 between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotBetween(String value1, String value2) { |
||||
addCriterion("ext_3 not between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
*/ |
||||
public static class Criteria extends GeneratedCriteria { |
||||
|
||||
protected Criteria() { |
||||
super(); |
||||
} |
||||
} |
||||
|
||||
public static class Criterion { |
||||
private String condition; |
||||
|
||||
private Object value; |
||||
|
||||
private Object secondValue; |
||||
|
||||
private boolean noValue; |
||||
|
||||
private boolean singleValue; |
||||
|
||||
private boolean betweenValue; |
||||
|
||||
private boolean listValue; |
||||
|
||||
private String typeHandler; |
||||
|
||||
public String getCondition() { |
||||
return condition; |
||||
} |
||||
|
||||
public Object getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public Object getSecondValue() { |
||||
return secondValue; |
||||
} |
||||
|
||||
public boolean isNoValue() { |
||||
return noValue; |
||||
} |
||||
|
||||
public boolean isSingleValue() { |
||||
return singleValue; |
||||
} |
||||
|
||||
public boolean isBetweenValue() { |
||||
return betweenValue; |
||||
} |
||||
|
||||
public boolean isListValue() { |
||||
return listValue; |
||||
} |
||||
|
||||
public String getTypeHandler() { |
||||
return typeHandler; |
||||
} |
||||
|
||||
protected Criterion(String condition) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.typeHandler = null; |
||||
this.noValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.typeHandler = typeHandler; |
||||
if (value instanceof List<?>) { |
||||
this.listValue = true; |
||||
} else { |
||||
this.singleValue = true; |
||||
} |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value) { |
||||
this(condition, value, null); |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.secondValue = secondValue; |
||||
this.typeHandler = typeHandler; |
||||
this.betweenValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) { |
||||
this(condition, value, secondValue, null); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,52 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* @serviceName CmsContentDataEnum.java |
||||
* @author Sum1Dream |
||||
* @version 1.0.0 |
||||
* @Description // CMS内容数据
|
||||
* @createTime 09:22 2022/9/28 |
||||
**/ |
||||
public enum CmsContentDataEnum { |
||||
|
||||
REFUEL(1 , "加油专区"), |
||||
INTEGRAL(2 , "积分专区"), |
||||
UNION_PAY(3 , "银联专区"), |
||||
PREFERABLY(4 , "优选商品"), |
||||
UNION_CARD(5 , "工会卡专区"), |
||||
DISCOUNT(6 , "天天好券"), |
||||
; |
||||
|
||||
private Integer type; |
||||
private String name; |
||||
|
||||
|
||||
CmsContentDataEnum(int type , String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public static Integer getTypeByName(String name) { |
||||
for (CmsContentDataEnum ele : values()) { |
||||
if(Objects.equals(name,ele.getName())) return ele.getType(); |
||||
} |
||||
return null; |
||||
} |
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,53 @@ |
||||
package com.hai.model; |
||||
|
||||
/** |
||||
* @author sum1dream |
||||
*/ |
||||
public class TextMessage { |
||||
|
||||
private String toUserName; |
||||
private String fromUserName; |
||||
private String msgType; |
||||
private String content; |
||||
private Long createTime; |
||||
|
||||
public String getToUserName() { |
||||
return toUserName; |
||||
} |
||||
|
||||
public void setToUserName(String toUserName) { |
||||
this.toUserName = toUserName; |
||||
} |
||||
|
||||
public String getFromUserName() { |
||||
return fromUserName; |
||||
} |
||||
|
||||
public void setFromUserName(String fromUserName) { |
||||
this.fromUserName = fromUserName; |
||||
} |
||||
|
||||
public String getMsgType() { |
||||
return msgType; |
||||
} |
||||
|
||||
public void setMsgType(String msgType) { |
||||
this.msgType = msgType; |
||||
} |
||||
|
||||
public String getContent() { |
||||
return content; |
||||
} |
||||
|
||||
public void setContent(String content) { |
||||
this.content = content; |
||||
} |
||||
|
||||
public Long getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Long createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
} |
@ -0,0 +1,58 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.BsMsg; |
||||
import com.hai.entity.HighUser; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @serviceName BsMsgService.java |
||||
* @author Sum1Dream |
||||
* @version 1.0.0 |
||||
* @Description // 站内信接口
|
||||
* @createTime 14:27 2022/9/20 |
||||
**/ |
||||
public interface BsMsgService { |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name insertMsg |
||||
* @Description // 新增站内信
|
||||
* @Date 14:30 2022/9/20 |
||||
* @Param [bsMsg] |
||||
* @Return void |
||||
*/ |
||||
void insertMsg(BsMsg bsMsg , HighUser user); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name updateMsg |
||||
* @Description //修改站内信
|
||||
* @Date 14:30 2022/9/20 |
||||
* @Param [bsMsg] |
||||
* @Return void |
||||
*/ |
||||
void updateMsg(BsMsg bsMsg); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name findMsg |
||||
* @Description // 根据id查询站内信
|
||||
* @Date 14:33 2022/9/20 |
||||
* @Param [id] |
||||
* @Return com.hai.entity.BsMsg |
||||
*/ |
||||
BsMsg findMsg(Long id); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name getMsgByList |
||||
* @Description // 查询站内信列表
|
||||
* @Date 14:34 2022/9/20 |
||||
* @Param [map] |
||||
* @Return java.util.List<com.hai.entity.BsMsg> |
||||
*/ |
||||
List<BsMsg> getMsgByList(Map<String , Object> map); |
||||
|
||||
} |
@ -0,0 +1,90 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.dao.BsMsgMapper; |
||||
import com.hai.dao.BsMsgUserMapper; |
||||
import com.hai.entity.BsMsg; |
||||
import com.hai.entity.BsMsgExample; |
||||
import com.hai.entity.BsMsgUser; |
||||
import com.hai.entity.HighUser; |
||||
import com.hai.service.BsMsgService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.beans.Transient; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.jar.JarEntry; |
||||
|
||||
/** |
||||
* @author sum1dream |
||||
*/ |
||||
@Service("bsMsgService") |
||||
public class BsMsgServiceImpl implements BsMsgService { |
||||
|
||||
@Resource |
||||
private BsMsgMapper bsMsgMapper; |
||||
|
||||
@Resource |
||||
private BsMsgUserMapper bsMsgUserMapper; |
||||
|
||||
@Override |
||||
@Transactional |
||||
public void insertMsg(BsMsg bsMsg , HighUser user) { |
||||
|
||||
bsMsgMapper.insert(bsMsg); |
||||
if (bsMsg.getMsgType()==1){ |
||||
BsMsgUser bsMsgUser = new BsMsgUser(); |
||||
bsMsgUser.setCreateTime(new Date()); |
||||
bsMsgUser.setUpdateTime(new Date()); |
||||
bsMsgUser.setMsgId(bsMsg.getId()); |
||||
bsMsgUser.setUserName(user.getName()); |
||||
bsMsgUser.setUserId(user.getId()); |
||||
bsMsgUser.setUserPhone(user.getPhone()); |
||||
bsMsgUser.setWhereCheck(false); |
||||
bsMsgUserMapper.insert(bsMsgUser); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void updateMsg(BsMsg bsMsg) { |
||||
bsMsgMapper.updateByPrimaryKey(bsMsg); |
||||
} |
||||
|
||||
@Override |
||||
public BsMsg findMsg(Long id) { |
||||
return bsMsgMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public List<BsMsg> getMsgByList(Map<String, Object> map) { |
||||
|
||||
BsMsgExample example = new BsMsgExample(); |
||||
BsMsgExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getInteger(map , "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getInteger(map , "type")); |
||||
} |
||||
if (MapUtils.getInteger(map , "jumpType") != null) { |
||||
criteria.andJumpTypeEqualTo(MapUtils.getInteger(map , "jumpType")); |
||||
} |
||||
if (MapUtils.getInteger(map , "msgType") != null) { |
||||
criteria.andMsgTypeEqualTo(MapUtils.getInteger(map , "msgType")); |
||||
} |
||||
if (MapUtils.getInteger(map , "title") != null) { |
||||
criteria.andTitleLike("%" + MapUtils.getString(map , "title") + "%" ); |
||||
} |
||||
if (MapUtils.getLong(map , "companyId") != null) { |
||||
criteria.andCompanyIdEqualTo(MapUtils.getLong(map , "companyId")); |
||||
} |
||||
if (MapUtils.getInteger(map , "status") != null) { |
||||
criteria.andStatusEqualTo(MapUtils.getInteger(map , "status")); |
||||
} else { |
||||
criteria.andStatusNotEqualTo(0); |
||||
} |
||||
|
||||
return bsMsgMapper.selectByExample(example); |
||||
} |
||||
} |
@ -1,2 +1,5 @@ |
||||
wxH5AppId=wxa075e8509802f826 |
||||
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 |
||||
|
||||
wxAppId=wx8d49e2f83025229d |
||||
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df |
||||
|
@ -0,0 +1,2 @@ |
||||
wxH5AppId=wxa075e8509802f826 |
||||
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 |
Loading…
Reference in new issue