Commit 3dbcd483 by XiaHou

微信扫码登录相关代码提交

parent c584e28e
......@@ -232,6 +232,22 @@
<artifactId>wxpay-sdk</artifactId>
<version>0.0.3</version>
</dependency>
<!--引入微信相关jar保存-->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-pay</artifactId>
<version>3.5.0</version>
</dependency>
</dependencies>
<repositories>
......
package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.common.Constants;
import com.hwstudio.antaile.dto.WxInsertUserParam;
import com.hwstudio.antaile.dto.WxPayCreateOrderQureyParam;
import com.hwstudio.antaile.service.AtlNotifyService;
import com.hwstudio.antaile.service.AtlWxService;
import com.hwstudio.antaile.utils.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.IOException;
/**
* @Author xh
* @Date 2021/5/17
* description:
*/
@Controller
@RequestMapping(value = "/notify")
@Api(tags = "安泰乐回调地址相关接口")
@CrossOrigin(origins = "*",maxAge = 3600)
public class AtlNotifyController extends BaseController{
@Autowired
private AtlNotifyService atlNotifyService;
/**
* 微信支付回调
*/
@RequestMapping(value = "/wxPayCallback")
public String wxPayCallback(HttpServletRequest request, HttpServletResponse response) {
String inputLine;
String notifyXml = "";
String resXml = "";
try {
while ((inputLine = request.getReader().readLine()) != null) {
notifyXml += inputLine;
}
request.getReader().close();
} catch (IOException e) {
e.printStackTrace();
}
JsonResult res = atlNotifyService.dealWxpayNotify(notifyXml);
//如果成功 返回微信停止回调的代码,否则 微信继续回调
if (res.getStatus().equals(Constants.RESPONSE_STATUS_500)) {
return res.getMessage();
}
String msg = "";
try {
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
msg = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
out.write(msg.getBytes());
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
return msg;
}
}
package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.AtlMemorial;
import com.hwstudio.antaile.entity.AtlTime;
import com.hwstudio.antaile.queryparam.QueryReleaseArticleParam;
import com.hwstudio.antaile.service.*;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.Page;
import com.hwstudio.antaile.vo.*;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -69,7 +67,7 @@ public class AtlTimeController extends BaseController {
return JsonResult.notLogin();
}
List<AtlTimeListDto> list = atlTimeService.findMyTimeAllList(userId);
for (AtlTimeListDto dto :list) {
for (AtlTimeListDto dto : list) {
Long timeId = dto.getId();
Integer count = atlTimeArticleServie.getArticleCountByTimeId(timeId);
dto.setArticleCount(count);
......@@ -88,10 +86,10 @@ public class AtlTimeController extends BaseController {
if (userId == null) {
return JsonResult.notLogin();
}
if(null == timeId){
if (null == timeId) {
AtlTimeListDto dto = atlTimeService.getDefaultTime(userId);
return JsonResult.success("获取快捷发布默认时光纪成功", dto);
}else {
} else {
AtlTime atlTime = atlTimeService.getById(timeId);
return JsonResult.success("获取快捷发布默认时光纪成功", atlTime);
}
......@@ -143,8 +141,8 @@ public class AtlTimeController extends BaseController {
return JsonResult.notLogin();
}
atlTimeService.addTime(atlTimeVo, userId);
return JsonResult.success("新增时光纪成功");
AtlTime atlTime = atlTimeService.addTime(atlTimeVo, userId);
return JsonResult.success("新增时光纪成功", atlTime);
}
@PostMapping(value = "/selectDefault")
......@@ -317,10 +315,10 @@ public class AtlTimeController extends BaseController {
return JsonResult.success("获取时光纪详情成功", atlTimeDetailsDto);
}
@RequestMapping(value = "/releaseFile")
@PostMapping(value = "/releaseFile")
@ApiOperation(value = "新增图片/视频/音频", httpMethod = "POST", notes = "新增图片/视频/音频")
@ApiResponses(@ApiResponse(code = 200, message = "请求成功", response = JsonResult.class))
public JsonResult releaseFile(AtlTimeArticleFileVo atlTimeArticleFileVo) {
public JsonResult releaseFile(@ApiParam(value = "传入对象") @RequestBody AtlTimeArticleFileVo atlTimeArticleFileVo) {
Long userId = super.getUserId();
if (userId == null) {
return JsonResult.notLogin();
......@@ -571,9 +569,14 @@ public class AtlTimeController extends BaseController {
@PostMapping(value = "/selectRandomAtlTime")
@ApiOperation(value = "随机获取推荐3个时光纪", httpMethod = "POST", notes = "随机获取推荐3个时光纪")
public JsonResult selectRandomAtlTime( ) {
public JsonResult selectRandomAtlTime() {
return JsonResult.success("获取时光纪详情成功", this.atlTimeService.selectRandomAtlTime());
}
@ApiOperation("查询我的待办相关时光纪数据")
@RequestMapping(value = "/selectAtlTimeCountMap", method = RequestMethod.GET)
public JsonResult selectAtlTimeCountMap(@ApiParam(value = "用户id", required = true) @RequestParam(value = "userId", required = true) Long userId) {
return this.atlTimeService.selectAtlTimeCountMap(userId);
}
}
......@@ -2,16 +2,20 @@ package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.AtlNewsListDto;
import com.hwstudio.antaile.dto.AtlTimeMessageListDto;
import com.hwstudio.antaile.dto.WxInsertUserParam;
import com.hwstudio.antaile.mbg.po.SysAtlTimeMessage;
import com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam;
import com.hwstudio.antaile.service.AtlTimeMessageService;
import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.Page;
import com.hwstudio.antaile.vo.AtlTimeMessageVO;
import com.hwstudio.antaile.vo.PageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Name:
......@@ -114,4 +118,16 @@ public class AtlTimeMessageController extends BaseController{
}
return atlTimeMessageService.isMessageUnRead(userId);
}
@RequestMapping(value = "/queryAtlTimeMessageListByPage",method = RequestMethod.GET)
@ApiOperation("分页查询留言List 不分页不传递分页参数(会员中心留言管理)")
public JsonResult<List<AtlTimeMessageVO>> queryAtlTimeMessageListByPage(@ModelAttribute QueryAtlTimeMessageParam queryAtlTimeMessageParam, @ModelAttribute Page page) {
return JsonResult.success("获取成功",this.atlTimeMessageService.queryAtlTimeMessageListByPage(queryAtlTimeMessageParam,page ));
}
@RequestMapping(value = "/updateAtlTimeMessageById",method = RequestMethod.POST)
@ApiOperation("根据id 修改一条安泰乐的留言数据(需要改啥数据传哪个参数即可)")
public JsonResult updateAtlTimeMessageById(@ApiParam(value = "传入对象") @RequestBody SysAtlTimeMessage sysAtlTimeMessage) {
return this.atlTimeMessageService.updateAtlTimeMessageById(sysAtlTimeMessage);
}
}
package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.WxInsertUserParam;
import com.hwstudio.antaile.dto.WxPayCreateOrderQureyParam;
import com.hwstudio.antaile.service.AtlWxService;
import com.hwstudio.antaile.utils.JsonResult;
import io.swagger.annotations.Api;
......@@ -10,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* @Author xh
* @Date 2021/5/17
......@@ -17,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
*/
@Controller
@RequestMapping(value = "/wx")
@Api(tags = "用户相关接口")
@Api(tags = "安泰乐微信相关接口")
@CrossOrigin(origins = "*",maxAge = 3600)
public class AtlWxController extends BaseController{
......@@ -25,30 +28,55 @@ public class AtlWxController extends BaseController{
private AtlWxService atlWxService;
@RequestMapping(value = "getQrcodeUrl",method = RequestMethod.GET)
@ApiOperation("获取二维码链接地址")
@ApiOperation("获取二维码链接地址(微信网页应用)")
@ResponseBody
public JsonResult getQrcodeUrl() {
return this.atlWxService.getQrcodeUrl();
}
@RequestMapping(value = "getQrcodeAndState",method = RequestMethod.GET)
@ApiOperation("微信二维码回调地址")
@ApiOperation("微信二维码回调地址,通过微信code换取openId等信息(微信网页应用)")
@ResponseBody
public JsonResult getQrcodeAndState(@RequestParam(value = "code", required = true) String code, @RequestParam(value = "state", required = true) String state) {
return this.atlWxService.getAccessToken(code,state );
public JsonResult getQrcodeAndState(@RequestParam(value = "code", required = true) String code, @RequestParam(value = "state", required = false) String state) {
return this.atlWxService.getAccessToken(code,state,1 );
}
@RequestMapping(value = "returnQrcodeAndState",method = RequestMethod.GET)
@ApiOperation("重定向:返回微信Code与state")
@ApiOperation("重定向:返回微信Code与state(微信网页应用)")
public String returnQrcodeAndState(@RequestParam(value = "code", required = true) String code, @RequestParam(value = "state", required = true) String state) {
return "redirect:https://www.atl-life.com/#/bindPage?code="+code+"&state="+state;
}
@RequestMapping(value = "insertAtlUserByWxLogin",method = RequestMethod.POST)
@ApiOperation("新用户微信扫码登录,绑定手机号密码")
@ApiOperation("新用户微信扫码登录,绑定手机号密码(微信网页应用)")
@ResponseBody
public JsonResult insertAtlUserByWxLogin(@ApiParam(value = "传入对象") @RequestBody WxInsertUserParam wxInsertUserParam) {
//插入获取accessToken来源 1表示网页应用 2表示公众号
wxInsertUserParam.setType(1);
return this.atlWxService.insertAtlUserByWxLogin(wxInsertUserParam);
}
@RequestMapping(value = "getOfficeAccessToken",method = RequestMethod.GET)
@ApiOperation("获取公众号accessToken,通过微信code换取openId等信息(公众号应用)")
@ResponseBody
public JsonResult getOfficeAccessToken(@RequestParam(value = "code", required = true) String code, @RequestParam(value = "state", required = false) String state) {
return this.atlWxService.getAccessToken(code,state,2 );
}
@RequestMapping(value = "insertAtlUserByOfficeWxLogin",method = RequestMethod.POST)
@ApiOperation("绑定手机号密码(公众号应用)")
@ResponseBody
public JsonResult insertAtlUserByOfficeWxLogin(@ApiParam(value = "传入对象") @RequestBody WxInsertUserParam wxInsertUserParam) {
//插入获取accessToken来源 1表示网页应用 2表示公众号
wxInsertUserParam.setType(2);
return this.atlWxService.insertAtlUserByWxLogin(wxInsertUserParam);
}
@ApiOperation("微信支付统一下单(公众号jsapi支付)")
@PostMapping(value = "/wxPayCreateOrder")
public JsonResult wxPayCreateOrder(HttpServletRequest request, @ApiParam(value = "传入对象") @RequestBody WxPayCreateOrderQureyParam wxPayCreateOrderQureyParam) {
wxPayCreateOrderQureyParam.setRemoteAdd(request.getRemoteAddr());
return this.atlWxService.officeWxPayByJsapi(wxPayCreateOrderQureyParam);
}
}
package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.WxInsertUserParam;
import com.hwstudio.antaile.dto.WxPayCreateOrderQureyParam;
import com.hwstudio.antaile.mbg.po.SysMsgMain;
import com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam;
import com.hwstudio.antaile.queryparam.QueryMsgMainParam;
import com.hwstudio.antaile.service.AtlWxService;
import com.hwstudio.antaile.service.MsgMainService;
import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.Page;
import com.hwstudio.antaile.vo.AtlTimeMessageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Author xh
* @Date 2021/5/17
* description:
*/
@RestController
@RequestMapping(value = "/msgMain")
@Api(tags = "系统消息相关接口")
@CrossOrigin(origins = "*",maxAge = 3600)
public class MsgMainController extends BaseController{
@Autowired
private MsgMainService msgMainService;
@RequestMapping(value = "/queryMsgMainListByPage",method = RequestMethod.GET)
@ApiOperation("分页查询系统消息List 不分页不传递分页参数")
public JsonResult<List<SysMsgMain>> queryMsgMainListByPage(@ModelAttribute QueryMsgMainParam queryMsgMainParam, @ModelAttribute Page page) {
return JsonResult.success("查询成功",this.msgMainService.queryMsgMainListByPage(queryMsgMainParam, page));
}
}
......@@ -42,10 +42,12 @@ public class RegisterController {
@ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "pwd", value = "密码", required = true, dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "verifyCode", value = "验证码", required = true, dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "nickName", value = "昵称", required = false, dataType = "string", paramType = "query")
@ApiImplicitParam(name = "nickName", value = "昵称", required = false, dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "fromTimeid", value = "时光纪id", required = false, dataType = "Long", paramType = "query"),
@ApiImplicitParam(name = "fromUserid", value = "推荐人id", required = false, dataType = "Long", paramType = "query")
})
public JsonResult registerMobile(String mobile, String pwd, String verifyCode, String nickName) {
registerService.registerMobile(mobile, pwd, verifyCode, nickName);
public JsonResult registerMobile(String mobile, String pwd, String verifyCode, String nickName,Long fromTimeid,Long fromUserid) {
registerService.registerMobile(mobile, pwd, verifyCode, nickName,fromTimeid,fromUserid);
return JsonResult.success("注册成功");
}
......
......@@ -23,4 +23,6 @@ public class WxInsertUserParam implements Serializable {
private String loginPassword;
@ApiModelProperty(value = "验证码")
private String verifyCode;
@ApiModelProperty(value = "获取accessToken 来源 1表示网页应用 2表示公众号")
private Integer type;
}
package com.hwstudio.antaile.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author xh
* @Date 2020/9/24
* description:
*/
@Data
public class WxPayCreateOrderQureyParam implements Serializable {
@ApiModelProperty(value = "用户id")
private Long userId;
@ApiModelProperty(value = "支付描述",hidden = true)
private String body;
@ApiModelProperty(value = "订单号",required = true)
private String outTradeNo;
@ApiModelProperty(value = "支付金额 单位:分",required = true)
private BigDecimal totalFee;
@ApiModelProperty(value = "微信用户openId", hidden = true)
private String openId;
@ApiModelProperty(value = "ip地址", hidden = true)
private String remoteAdd;
}
......@@ -66,4 +66,8 @@ public class AtlUser implements Serializable{
private String webappOpenId;
@ApiModelProperty(value = "微信unionid")
private String unionid;
@ApiModelProperty(value = "注册来源于时光纪ID, 0为其它 ,非0对应时光纪id")
private Long fromTimeid;
@ApiModelProperty(value = "推荐人ID(用于用户邀请注册使用)")
private Long fromUserid;
}
\ No newline at end of file
......@@ -8,11 +8,19 @@ import java.util.List;
public interface AtlTimeLikeMapper {
List<AtlTimeListDto> getMyLikeTimeList(@Param("userId")Long userId);
List<AtlTimeListDto> getMyLikeTimeList(@Param("userId") Long userId);
AtlTimeLike getTimeLike(@Param("timeId")Long timeId, @Param("userId")Long userId);
AtlTimeLike getTimeLike(@Param("timeId") Long timeId, @Param("userId") Long userId);
void updateUnsubscribe(@Param("id")Long id);
void updateUnsubscribe(@Param("id") Long id);
void insert(AtlTimeLike atlTimeLike);
/**
* 查看用户喜欢的时光纪数量
*
* @param userId
* @return
*/
Long selectAtlTimeLikeCount(Long userId);
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.hwstudio.antaile.mapper;
import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.AtlTime;
import com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam;
import com.hwstudio.antaile.vo.AtlFineVo;
import com.hwstudio.antaile.vo.AtlTimeVo;
import org.apache.ibatis.annotations.Param;
......@@ -99,4 +100,19 @@ public interface AtlTimeMapper {
* @return
*/
List<OfficialWebsiteAtlTimeVO> selectRandomAtlTime();
/**
* 查询时光纪数量
*
* @param queryAtlTimeCountParam
* @return
*/
Long selectCountAtlTime(QueryAtlTimeCountParam queryAtlTimeCountParam);
/**
* 统计用户下时光纪所有的阅读量
* @param userId
* @return
*/
Long selectAtlTimeReadCountByUserId(Long userId);
}
\ No newline at end of file
package com.hwstudio.antaile.mapper;
import com.hwstudio.antaile.dto.AtlSearchDto;
import com.hwstudio.antaile.dto.AtlTimeMessageListDto;
import com.hwstudio.antaile.entity.AtlTimeMessage;
import com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam;
import com.hwstudio.antaile.vo.AtlTimeMessageVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface AtlTimeMessageMapper {
List<AtlTimeMessageListDto> getList(@Param("objId")Long objId, @Param("objType")int objType);
List<AtlTimeMessageListDto> getList(@Param("objId") Long objId, @Param("objType") int objType);
void addMessage(AtlTimeMessage atlTimeMessage);
......@@ -17,7 +18,7 @@ public interface AtlTimeMessageMapper {
void delMessage(@Param("id") Long id);
List<AtlTimeMessageListDto> getUserMessageList(@Param("objId")Long objId, @Param("objType")int objType, @Param("toUserId") Long toUserId);
List<AtlTimeMessageListDto> getUserMessageList(@Param("objId") Long objId, @Param("objType") int objType, @Param("toUserId") Long toUserId);
void reviewMessage(@Param("id") Long id, @Param("state") Integer state);
......@@ -25,7 +26,15 @@ public interface AtlTimeMessageMapper {
Long getCountUnRead(@Param("userId") Long userId);
Long getCountUnReadByTimeId(@Param("objId")Long objId, @Param("objType")int objType);
Long getCountUnReadByTimeId(@Param("objId") Long objId, @Param("objType") int objType);
List<Map<String,Object>> search(@Param("content") String content, @Param("objId") Long objId, @Param("objType") Integer objType);
List<Map<String, Object>> search(@Param("content") String content, @Param("objId") Long objId, @Param("objType") Integer objType);
/**
* 根据条件查询留言信息
*
* @param queryAtlTimeMessageParam
* @return
*/
List<AtlTimeMessageVO> queryAtlTimeMessageList(QueryAtlTimeMessageParam queryAtlTimeMessageParam);
}
\ No newline at end of file
......@@ -32,6 +32,8 @@ public interface AtlUserMapper {
AtlUser getByWebappOpenId(String getByWebappOpenId);
AtlUser getByUnionid(String unionid);
void updatePwd(@Param("pwd") String pwd, @Param("userId") Long userId);
void insert(AtlUser atlUser);
......
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.SysAtlTimeArticle;
import com.hwstudio.antaile.mbg.po.SysAtlTimeArticleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysAtlTimeArticleMapper {
long countByExample(SysAtlTimeArticleExample example);
int deleteByExample(SysAtlTimeArticleExample example);
int deleteByPrimaryKey(Long id);
int insert(SysAtlTimeArticle record);
int insertSelective(SysAtlTimeArticle record);
List<SysAtlTimeArticle> selectByExampleWithBLOBs(SysAtlTimeArticleExample example);
List<SysAtlTimeArticle> selectByExample(SysAtlTimeArticleExample example);
SysAtlTimeArticle selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysAtlTimeArticle record, @Param("example") SysAtlTimeArticleExample example);
int updateByExampleWithBLOBs(@Param("record") SysAtlTimeArticle record, @Param("example") SysAtlTimeArticleExample example);
int updateByExample(@Param("record") SysAtlTimeArticle record, @Param("example") SysAtlTimeArticleExample example);
int updateByPrimaryKeySelective(SysAtlTimeArticle record);
int updateByPrimaryKeyWithBLOBs(SysAtlTimeArticle record);
int updateByPrimaryKey(SysAtlTimeArticle record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.SysAtlTimeMessage;
import com.hwstudio.antaile.mbg.po.SysAtlTimeMessageExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysAtlTimeMessageMapper {
long countByExample(SysAtlTimeMessageExample example);
int deleteByExample(SysAtlTimeMessageExample example);
int deleteByPrimaryKey(Long id);
int insert(SysAtlTimeMessage record);
int insertSelective(SysAtlTimeMessage record);
List<SysAtlTimeMessage> selectByExampleWithBLOBs(SysAtlTimeMessageExample example);
List<SysAtlTimeMessage> selectByExample(SysAtlTimeMessageExample example);
SysAtlTimeMessage selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysAtlTimeMessage record, @Param("example") SysAtlTimeMessageExample example);
int updateByExampleWithBLOBs(@Param("record") SysAtlTimeMessage record, @Param("example") SysAtlTimeMessageExample example);
int updateByExample(@Param("record") SysAtlTimeMessage record, @Param("example") SysAtlTimeMessageExample example);
int updateByPrimaryKeySelective(SysAtlTimeMessage record);
int updateByPrimaryKeyWithBLOBs(SysAtlTimeMessage record);
int updateByPrimaryKey(SysAtlTimeMessage record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.SysMsgMain;
import com.hwstudio.antaile.mbg.po.SysMsgMainExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysMsgMainMapper {
long countByExample(SysMsgMainExample example);
int deleteByExample(SysMsgMainExample example);
int deleteByPrimaryKey(Long id);
int insert(SysMsgMain record);
int insertSelective(SysMsgMain record);
List<SysMsgMain> selectByExampleWithBLOBs(SysMsgMainExample example);
List<SysMsgMain> selectByExample(SysMsgMainExample example);
SysMsgMain selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysMsgMain record, @Param("example") SysMsgMainExample example);
int updateByExampleWithBLOBs(@Param("record") SysMsgMain record, @Param("example") SysMsgMainExample example);
int updateByExample(@Param("record") SysMsgMain record, @Param("example") SysMsgMainExample example);
int updateByPrimaryKeySelective(SysMsgMain record);
int updateByPrimaryKeyWithBLOBs(SysMsgMain record);
int updateByPrimaryKey(SysMsgMain record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class SysAtlTimeArticle implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "时光纪id")
private Long timeId;
@ApiModelProperty(value = "类型 1-文章 2-图片 3-视频 4-音频")
private Integer type;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "作者")
private String author;
@ApiModelProperty(value = "标签")
private String label;
@ApiModelProperty(value = "隐私设置")
private Integer privacySetting;
@ApiModelProperty(value = "发生时间")
private Date occurTime;
@ApiModelProperty(value = "是否删除 0-否1-是")
private Integer delFlag;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
@ApiModelProperty(value = "修改时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateDate;
@ApiModelProperty(value = "用户id")
private Long userId;
@ApiModelProperty(value = "收藏次数")
private Integer collection;
@ApiModelProperty(value = "内容")
private String content;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTimeId() {
return timeId;
}
public void setTimeId(Long timeId) {
this.timeId = timeId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Integer getPrivacySetting() {
return privacySetting;
}
public void setPrivacySetting(Integer privacySetting) {
this.privacySetting = privacySetting;
}
public Date getOccurTime() {
return occurTime;
}
public void setOccurTime(Date occurTime) {
this.occurTime = occurTime;
}
public Integer getDelFlag() {
return delFlag;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getCollection() {
return collection;
}
public void setCollection(Integer collection) {
this.collection = collection;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@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(", timeId=").append(timeId);
sb.append(", type=").append(type);
sb.append(", title=").append(title);
sb.append(", author=").append(author);
sb.append(", label=").append(label);
sb.append(", privacySetting=").append(privacySetting);
sb.append(", occurTime=").append(occurTime);
sb.append(", delFlag=").append(delFlag);
sb.append(", remark=").append(remark);
sb.append(", createDate=").append(createDate);
sb.append(", updateDate=").append(updateDate);
sb.append(", userId=").append(userId);
sb.append(", collection=").append(collection);
sb.append(", content=").append(content);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
public class SysAtlTimeArticleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysAtlTimeArticleExample() {
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;
}
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));
}
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value.getTime()), property);
}
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
if (values == null || values.size() == 0) {
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
}
List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
Iterator<Date> iter = values.iterator();
while (iter.hasNext()) {
dateList.add(new java.sql.Date(iter.next().getTime()));
}
addCriterion(condition, dateList, property);
}
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
}
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 andTimeIdIsNull() {
addCriterion("time_id is null");
return (Criteria) this;
}
public Criteria andTimeIdIsNotNull() {
addCriterion("time_id is not null");
return (Criteria) this;
}
public Criteria andTimeIdEqualTo(Long value) {
addCriterion("time_id =", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdNotEqualTo(Long value) {
addCriterion("time_id <>", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdGreaterThan(Long value) {
addCriterion("time_id >", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("time_id >=", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdLessThan(Long value) {
addCriterion("time_id <", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdLessThanOrEqualTo(Long value) {
addCriterion("time_id <=", value, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdIn(List<Long> values) {
addCriterion("time_id in", values, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdNotIn(List<Long> values) {
addCriterion("time_id not in", values, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdBetween(Long value1, Long value2) {
addCriterion("time_id between", value1, value2, "timeId");
return (Criteria) this;
}
public Criteria andTimeIdNotBetween(Long value1, Long value2) {
addCriterion("time_id not between", value1, value2, "timeId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andAuthorIsNull() {
addCriterion("author is null");
return (Criteria) this;
}
public Criteria andAuthorIsNotNull() {
addCriterion("author is not null");
return (Criteria) this;
}
public Criteria andAuthorEqualTo(String value) {
addCriterion("author =", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotEqualTo(String value) {
addCriterion("author <>", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThan(String value) {
addCriterion("author >", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThanOrEqualTo(String value) {
addCriterion("author >=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThan(String value) {
addCriterion("author <", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThanOrEqualTo(String value) {
addCriterion("author <=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLike(String value) {
addCriterion("author like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotLike(String value) {
addCriterion("author not like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorIn(List<String> values) {
addCriterion("author in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorNotIn(List<String> values) {
addCriterion("author not in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorBetween(String value1, String value2) {
addCriterion("author between", value1, value2, "author");
return (Criteria) this;
}
public Criteria andAuthorNotBetween(String value1, String value2) {
addCriterion("author not between", value1, value2, "author");
return (Criteria) this;
}
public Criteria andLabelIsNull() {
addCriterion("label is null");
return (Criteria) this;
}
public Criteria andLabelIsNotNull() {
addCriterion("label is not null");
return (Criteria) this;
}
public Criteria andLabelEqualTo(String value) {
addCriterion("label =", value, "label");
return (Criteria) this;
}
public Criteria andLabelNotEqualTo(String value) {
addCriterion("label <>", value, "label");
return (Criteria) this;
}
public Criteria andLabelGreaterThan(String value) {
addCriterion("label >", value, "label");
return (Criteria) this;
}
public Criteria andLabelGreaterThanOrEqualTo(String value) {
addCriterion("label >=", value, "label");
return (Criteria) this;
}
public Criteria andLabelLessThan(String value) {
addCriterion("label <", value, "label");
return (Criteria) this;
}
public Criteria andLabelLessThanOrEqualTo(String value) {
addCriterion("label <=", value, "label");
return (Criteria) this;
}
public Criteria andLabelLike(String value) {
addCriterion("label like", value, "label");
return (Criteria) this;
}
public Criteria andLabelNotLike(String value) {
addCriterion("label not like", value, "label");
return (Criteria) this;
}
public Criteria andLabelIn(List<String> values) {
addCriterion("label in", values, "label");
return (Criteria) this;
}
public Criteria andLabelNotIn(List<String> values) {
addCriterion("label not in", values, "label");
return (Criteria) this;
}
public Criteria andLabelBetween(String value1, String value2) {
addCriterion("label between", value1, value2, "label");
return (Criteria) this;
}
public Criteria andLabelNotBetween(String value1, String value2) {
addCriterion("label not between", value1, value2, "label");
return (Criteria) this;
}
public Criteria andPrivacySettingIsNull() {
addCriterion("privacy_setting is null");
return (Criteria) this;
}
public Criteria andPrivacySettingIsNotNull() {
addCriterion("privacy_setting is not null");
return (Criteria) this;
}
public Criteria andPrivacySettingEqualTo(Integer value) {
addCriterion("privacy_setting =", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingNotEqualTo(Integer value) {
addCriterion("privacy_setting <>", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingGreaterThan(Integer value) {
addCriterion("privacy_setting >", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingGreaterThanOrEqualTo(Integer value) {
addCriterion("privacy_setting >=", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingLessThan(Integer value) {
addCriterion("privacy_setting <", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingLessThanOrEqualTo(Integer value) {
addCriterion("privacy_setting <=", value, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingIn(List<Integer> values) {
addCriterion("privacy_setting in", values, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingNotIn(List<Integer> values) {
addCriterion("privacy_setting not in", values, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingBetween(Integer value1, Integer value2) {
addCriterion("privacy_setting between", value1, value2, "privacySetting");
return (Criteria) this;
}
public Criteria andPrivacySettingNotBetween(Integer value1, Integer value2) {
addCriterion("privacy_setting not between", value1, value2, "privacySetting");
return (Criteria) this;
}
public Criteria andOccurTimeIsNull() {
addCriterion("occur_time is null");
return (Criteria) this;
}
public Criteria andOccurTimeIsNotNull() {
addCriterion("occur_time is not null");
return (Criteria) this;
}
public Criteria andOccurTimeEqualTo(Date value) {
addCriterionForJDBCDate("occur_time =", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeNotEqualTo(Date value) {
addCriterionForJDBCDate("occur_time <>", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeGreaterThan(Date value) {
addCriterionForJDBCDate("occur_time >", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeGreaterThanOrEqualTo(Date value) {
addCriterionForJDBCDate("occur_time >=", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeLessThan(Date value) {
addCriterionForJDBCDate("occur_time <", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeLessThanOrEqualTo(Date value) {
addCriterionForJDBCDate("occur_time <=", value, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeIn(List<Date> values) {
addCriterionForJDBCDate("occur_time in", values, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeNotIn(List<Date> values) {
addCriterionForJDBCDate("occur_time not in", values, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeBetween(Date value1, Date value2) {
addCriterionForJDBCDate("occur_time between", value1, value2, "occurTime");
return (Criteria) this;
}
public Criteria andOccurTimeNotBetween(Date value1, Date value2) {
addCriterionForJDBCDate("occur_time not between", value1, value2, "occurTime");
return (Criteria) this;
}
public Criteria andDelFlagIsNull() {
addCriterion("del_flag is null");
return (Criteria) this;
}
public Criteria andDelFlagIsNotNull() {
addCriterion("del_flag is not null");
return (Criteria) this;
}
public Criteria andDelFlagEqualTo(Integer value) {
addCriterion("del_flag =", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotEqualTo(Integer value) {
addCriterion("del_flag <>", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThan(Integer value) {
addCriterion("del_flag >", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("del_flag >=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThan(Integer value) {
addCriterion("del_flag <", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
addCriterion("del_flag <=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagIn(List<Integer> values) {
addCriterion("del_flag in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotIn(List<Integer> values) {
addCriterion("del_flag not in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagBetween(Integer value1, Integer value2) {
addCriterion("del_flag between", value1, value2, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
addCriterion("del_flag not between", value1, value2, "delFlag");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andCreateDateIsNull() {
addCriterion("create_date is null");
return (Criteria) this;
}
public Criteria andCreateDateIsNotNull() {
addCriterion("create_date is not null");
return (Criteria) this;
}
public Criteria andCreateDateEqualTo(Date value) {
addCriterion("create_date =", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotEqualTo(Date value) {
addCriterion("create_date <>", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThan(Date value) {
addCriterion("create_date >", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
addCriterion("create_date >=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThan(Date value) {
addCriterion("create_date <", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThanOrEqualTo(Date value) {
addCriterion("create_date <=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateIn(List<Date> values) {
addCriterion("create_date in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotIn(List<Date> values) {
addCriterion("create_date not in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateBetween(Date value1, Date value2) {
addCriterion("create_date between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotBetween(Date value1, Date value2) {
addCriterion("create_date not between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andUpdateDateIsNull() {
addCriterion("update_date is null");
return (Criteria) this;
}
public Criteria andUpdateDateIsNotNull() {
addCriterion("update_date is not null");
return (Criteria) this;
}
public Criteria andUpdateDateEqualTo(Date value) {
addCriterion("update_date =", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotEqualTo(Date value) {
addCriterion("update_date <>", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThan(Date value) {
addCriterion("update_date >", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) {
addCriterion("update_date >=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThan(Date value) {
addCriterion("update_date <", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThanOrEqualTo(Date value) {
addCriterion("update_date <=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateIn(List<Date> values) {
addCriterion("update_date in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotIn(List<Date> values) {
addCriterion("update_date not in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateBetween(Date value1, Date value2) {
addCriterion("update_date between", value1, value2, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotBetween(Date value1, Date value2) {
addCriterion("update_date not between", value1, value2, "updateDate");
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 andCollectionIsNull() {
addCriterion("collection is null");
return (Criteria) this;
}
public Criteria andCollectionIsNotNull() {
addCriterion("collection is not null");
return (Criteria) this;
}
public Criteria andCollectionEqualTo(Integer value) {
addCriterion("collection =", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionNotEqualTo(Integer value) {
addCriterion("collection <>", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionGreaterThan(Integer value) {
addCriterion("collection >", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionGreaterThanOrEqualTo(Integer value) {
addCriterion("collection >=", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionLessThan(Integer value) {
addCriterion("collection <", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionLessThanOrEqualTo(Integer value) {
addCriterion("collection <=", value, "collection");
return (Criteria) this;
}
public Criteria andCollectionIn(List<Integer> values) {
addCriterion("collection in", values, "collection");
return (Criteria) this;
}
public Criteria andCollectionNotIn(List<Integer> values) {
addCriterion("collection not in", values, "collection");
return (Criteria) this;
}
public Criteria andCollectionBetween(Integer value1, Integer value2) {
addCriterion("collection between", value1, value2, "collection");
return (Criteria) this;
}
public Criteria andCollectionNotBetween(Integer value1, Integer value2) {
addCriterion("collection not between", value1, value2, "collection");
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);
}
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class SysAtlTimeMessage implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "用户id")
private Long userid;
@ApiModelProperty(value = "是否删除 0-否 1-是")
private Integer delFlag;
@ApiModelProperty(value = "类型 1-时光纪 2-文章")
private Integer objType;
@ApiModelProperty(value = "关联id")
private Long objId;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "状态 0-未审核 1-审核通过 2-审核不通过")
private Integer state;
@ApiModelProperty(value = "时光纪关联用户id")
private Long touserid;
@ApiModelProperty(value = "0:未读 1:已读")
private String readFlag;
@ApiModelProperty(value = "内容")
private String content;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserid() {
return userid;
}
public void setUserid(Long userid) {
this.userid = userid;
}
public Integer getDelFlag() {
return delFlag;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
public Integer getObjType() {
return objType;
}
public void setObjType(Integer objType) {
this.objType = objType;
}
public Long getObjId() {
return objId;
}
public void setObjId(Long objId) {
this.objId = objId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Long getTouserid() {
return touserid;
}
public void setTouserid(Long touserid) {
this.touserid = touserid;
}
public String getReadFlag() {
return readFlag;
}
public void setReadFlag(String readFlag) {
this.readFlag = readFlag;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@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(", userid=").append(userid);
sb.append(", delFlag=").append(delFlag);
sb.append(", objType=").append(objType);
sb.append(", objId=").append(objId);
sb.append(", createTime=").append(createTime);
sb.append(", state=").append(state);
sb.append(", touserid=").append(touserid);
sb.append(", readFlag=").append(readFlag);
sb.append(", content=").append(content);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysAtlTimeMessageExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysAtlTimeMessageExample() {
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;
}
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 andUseridIsNull() {
addCriterion("userId is null");
return (Criteria) this;
}
public Criteria andUseridIsNotNull() {
addCriterion("userId is not null");
return (Criteria) this;
}
public Criteria andUseridEqualTo(Long value) {
addCriterion("userId =", value, "userid");
return (Criteria) this;
}
public Criteria andUseridNotEqualTo(Long value) {
addCriterion("userId <>", value, "userid");
return (Criteria) this;
}
public Criteria andUseridGreaterThan(Long value) {
addCriterion("userId >", value, "userid");
return (Criteria) this;
}
public Criteria andUseridGreaterThanOrEqualTo(Long value) {
addCriterion("userId >=", value, "userid");
return (Criteria) this;
}
public Criteria andUseridLessThan(Long value) {
addCriterion("userId <", value, "userid");
return (Criteria) this;
}
public Criteria andUseridLessThanOrEqualTo(Long value) {
addCriterion("userId <=", value, "userid");
return (Criteria) this;
}
public Criteria andUseridIn(List<Long> values) {
addCriterion("userId in", values, "userid");
return (Criteria) this;
}
public Criteria andUseridNotIn(List<Long> values) {
addCriterion("userId not in", values, "userid");
return (Criteria) this;
}
public Criteria andUseridBetween(Long value1, Long value2) {
addCriterion("userId between", value1, value2, "userid");
return (Criteria) this;
}
public Criteria andUseridNotBetween(Long value1, Long value2) {
addCriterion("userId not between", value1, value2, "userid");
return (Criteria) this;
}
public Criteria andDelFlagIsNull() {
addCriterion("del_flag is null");
return (Criteria) this;
}
public Criteria andDelFlagIsNotNull() {
addCriterion("del_flag is not null");
return (Criteria) this;
}
public Criteria andDelFlagEqualTo(Integer value) {
addCriterion("del_flag =", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotEqualTo(Integer value) {
addCriterion("del_flag <>", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThan(Integer value) {
addCriterion("del_flag >", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("del_flag >=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThan(Integer value) {
addCriterion("del_flag <", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
addCriterion("del_flag <=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagIn(List<Integer> values) {
addCriterion("del_flag in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotIn(List<Integer> values) {
addCriterion("del_flag not in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagBetween(Integer value1, Integer value2) {
addCriterion("del_flag between", value1, value2, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
addCriterion("del_flag not between", value1, value2, "delFlag");
return (Criteria) this;
}
public Criteria andObjTypeIsNull() {
addCriterion("obj_type is null");
return (Criteria) this;
}
public Criteria andObjTypeIsNotNull() {
addCriterion("obj_type is not null");
return (Criteria) this;
}
public Criteria andObjTypeEqualTo(Integer value) {
addCriterion("obj_type =", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeNotEqualTo(Integer value) {
addCriterion("obj_type <>", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeGreaterThan(Integer value) {
addCriterion("obj_type >", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("obj_type >=", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeLessThan(Integer value) {
addCriterion("obj_type <", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeLessThanOrEqualTo(Integer value) {
addCriterion("obj_type <=", value, "objType");
return (Criteria) this;
}
public Criteria andObjTypeIn(List<Integer> values) {
addCriterion("obj_type in", values, "objType");
return (Criteria) this;
}
public Criteria andObjTypeNotIn(List<Integer> values) {
addCriterion("obj_type not in", values, "objType");
return (Criteria) this;
}
public Criteria andObjTypeBetween(Integer value1, Integer value2) {
addCriterion("obj_type between", value1, value2, "objType");
return (Criteria) this;
}
public Criteria andObjTypeNotBetween(Integer value1, Integer value2) {
addCriterion("obj_type not between", value1, value2, "objType");
return (Criteria) this;
}
public Criteria andObjIdIsNull() {
addCriterion("obj_id is null");
return (Criteria) this;
}
public Criteria andObjIdIsNotNull() {
addCriterion("obj_id is not null");
return (Criteria) this;
}
public Criteria andObjIdEqualTo(Long value) {
addCriterion("obj_id =", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdNotEqualTo(Long value) {
addCriterion("obj_id <>", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdGreaterThan(Long value) {
addCriterion("obj_id >", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdGreaterThanOrEqualTo(Long value) {
addCriterion("obj_id >=", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdLessThan(Long value) {
addCriterion("obj_id <", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdLessThanOrEqualTo(Long value) {
addCriterion("obj_id <=", value, "objId");
return (Criteria) this;
}
public Criteria andObjIdIn(List<Long> values) {
addCriterion("obj_id in", values, "objId");
return (Criteria) this;
}
public Criteria andObjIdNotIn(List<Long> values) {
addCriterion("obj_id not in", values, "objId");
return (Criteria) this;
}
public Criteria andObjIdBetween(Long value1, Long value2) {
addCriterion("obj_id between", value1, value2, "objId");
return (Criteria) this;
}
public Criteria andObjIdNotBetween(Long value1, Long value2) {
addCriterion("obj_id not between", value1, value2, "objId");
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 andStateIsNull() {
addCriterion("state is null");
return (Criteria) this;
}
public Criteria andStateIsNotNull() {
addCriterion("state is not null");
return (Criteria) this;
}
public Criteria andStateEqualTo(Integer value) {
addCriterion("state =", value, "state");
return (Criteria) this;
}
public Criteria andStateNotEqualTo(Integer value) {
addCriterion("state <>", value, "state");
return (Criteria) this;
}
public Criteria andStateGreaterThan(Integer value) {
addCriterion("state >", value, "state");
return (Criteria) this;
}
public Criteria andStateGreaterThanOrEqualTo(Integer value) {
addCriterion("state >=", value, "state");
return (Criteria) this;
}
public Criteria andStateLessThan(Integer value) {
addCriterion("state <", value, "state");
return (Criteria) this;
}
public Criteria andStateLessThanOrEqualTo(Integer value) {
addCriterion("state <=", value, "state");
return (Criteria) this;
}
public Criteria andStateIn(List<Integer> values) {
addCriterion("state in", values, "state");
return (Criteria) this;
}
public Criteria andStateNotIn(List<Integer> values) {
addCriterion("state not in", values, "state");
return (Criteria) this;
}
public Criteria andStateBetween(Integer value1, Integer value2) {
addCriterion("state between", value1, value2, "state");
return (Criteria) this;
}
public Criteria andStateNotBetween(Integer value1, Integer value2) {
addCriterion("state not between", value1, value2, "state");
return (Criteria) this;
}
public Criteria andTouseridIsNull() {
addCriterion("toUserId is null");
return (Criteria) this;
}
public Criteria andTouseridIsNotNull() {
addCriterion("toUserId is not null");
return (Criteria) this;
}
public Criteria andTouseridEqualTo(Long value) {
addCriterion("toUserId =", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridNotEqualTo(Long value) {
addCriterion("toUserId <>", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridGreaterThan(Long value) {
addCriterion("toUserId >", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridGreaterThanOrEqualTo(Long value) {
addCriterion("toUserId >=", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridLessThan(Long value) {
addCriterion("toUserId <", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridLessThanOrEqualTo(Long value) {
addCriterion("toUserId <=", value, "touserid");
return (Criteria) this;
}
public Criteria andTouseridIn(List<Long> values) {
addCriterion("toUserId in", values, "touserid");
return (Criteria) this;
}
public Criteria andTouseridNotIn(List<Long> values) {
addCriterion("toUserId not in", values, "touserid");
return (Criteria) this;
}
public Criteria andTouseridBetween(Long value1, Long value2) {
addCriterion("toUserId between", value1, value2, "touserid");
return (Criteria) this;
}
public Criteria andTouseridNotBetween(Long value1, Long value2) {
addCriterion("toUserId not between", value1, value2, "touserid");
return (Criteria) this;
}
public Criteria andReadFlagIsNull() {
addCriterion("read_flag is null");
return (Criteria) this;
}
public Criteria andReadFlagIsNotNull() {
addCriterion("read_flag is not null");
return (Criteria) this;
}
public Criteria andReadFlagEqualTo(String value) {
addCriterion("read_flag =", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagNotEqualTo(String value) {
addCriterion("read_flag <>", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagGreaterThan(String value) {
addCriterion("read_flag >", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagGreaterThanOrEqualTo(String value) {
addCriterion("read_flag >=", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagLessThan(String value) {
addCriterion("read_flag <", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagLessThanOrEqualTo(String value) {
addCriterion("read_flag <=", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagLike(String value) {
addCriterion("read_flag like", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagNotLike(String value) {
addCriterion("read_flag not like", value, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagIn(List<String> values) {
addCriterion("read_flag in", values, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagNotIn(List<String> values) {
addCriterion("read_flag not in", values, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagBetween(String value1, String value2) {
addCriterion("read_flag between", value1, value2, "readFlag");
return (Criteria) this;
}
public Criteria andReadFlagNotBetween(String value1, String value2) {
addCriterion("read_flag not between", value1, value2, "readFlag");
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);
}
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class SysMsgMain implements Serializable {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "连接地址")
private String linkUrl;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private Long createUserId;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Long updateUserId;
@ApiModelProperty(value = "类型 1-系统消息 2-提醒消息 3-社交消息 4-用户中心系统消息")
private Integer type;
@ApiModelProperty(value = "是否删除 0-否 1-是")
private String delFlag;
@ApiModelProperty(value = "内容")
private String content;
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 String getLinkUrl() {
return linkUrl;
}
public void setLinkUrl(String linkUrl) {
this.linkUrl = linkUrl;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getCreateUserId() {
return createUserId;
}
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Long getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@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(", linkUrl=").append(linkUrl);
sb.append(", createTime=").append(createTime);
sb.append(", createUserId=").append(createUserId);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateUserId=").append(updateUserId);
sb.append(", type=").append(type);
sb.append(", delFlag=").append(delFlag);
sb.append(", content=").append(content);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysMsgMainExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysMsgMainExample() {
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;
}
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 andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andLinkUrlIsNull() {
addCriterion("link_url is null");
return (Criteria) this;
}
public Criteria andLinkUrlIsNotNull() {
addCriterion("link_url is not null");
return (Criteria) this;
}
public Criteria andLinkUrlEqualTo(String value) {
addCriterion("link_url =", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlNotEqualTo(String value) {
addCriterion("link_url <>", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlGreaterThan(String value) {
addCriterion("link_url >", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlGreaterThanOrEqualTo(String value) {
addCriterion("link_url >=", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlLessThan(String value) {
addCriterion("link_url <", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlLessThanOrEqualTo(String value) {
addCriterion("link_url <=", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlLike(String value) {
addCriterion("link_url like", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlNotLike(String value) {
addCriterion("link_url not like", value, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlIn(List<String> values) {
addCriterion("link_url in", values, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlNotIn(List<String> values) {
addCriterion("link_url not in", values, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlBetween(String value1, String value2) {
addCriterion("link_url between", value1, value2, "linkUrl");
return (Criteria) this;
}
public Criteria andLinkUrlNotBetween(String value1, String value2) {
addCriterion("link_url not between", value1, value2, "linkUrl");
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 andCreateUserIdIsNull() {
addCriterion("create_user_id is null");
return (Criteria) this;
}
public Criteria andCreateUserIdIsNotNull() {
addCriterion("create_user_id is not null");
return (Criteria) this;
}
public Criteria andCreateUserIdEqualTo(Long value) {
addCriterion("create_user_id =", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotEqualTo(Long value) {
addCriterion("create_user_id <>", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThan(Long value) {
addCriterion("create_user_id >", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("create_user_id >=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThan(Long value) {
addCriterion("create_user_id <", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThanOrEqualTo(Long value) {
addCriterion("create_user_id <=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdIn(List<Long> values) {
addCriterion("create_user_id in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotIn(List<Long> values) {
addCriterion("create_user_id not in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdBetween(Long value1, Long value2) {
addCriterion("create_user_id between", value1, value2, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotBetween(Long value1, Long value2) {
addCriterion("create_user_id not between", value1, value2, "createUserId");
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 andUpdateUserIdIsNull() {
addCriterion("update_user_id is null");
return (Criteria) this;
}
public Criteria andUpdateUserIdIsNotNull() {
addCriterion("update_user_id is not null");
return (Criteria) this;
}
public Criteria andUpdateUserIdEqualTo(Long value) {
addCriterion("update_user_id =", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotEqualTo(Long value) {
addCriterion("update_user_id <>", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThan(Long value) {
addCriterion("update_user_id >", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("update_user_id >=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThan(Long value) {
addCriterion("update_user_id <", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) {
addCriterion("update_user_id <=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdIn(List<Long> values) {
addCriterion("update_user_id in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotIn(List<Long> values) {
addCriterion("update_user_id not in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdBetween(Long value1, Long value2) {
addCriterion("update_user_id between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) {
addCriterion("update_user_id not between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLike(Integer value) {
addCriterion("type like", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotLike(Integer value) {
addCriterion("type not like", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andDelFlagIsNull() {
addCriterion("del_flag is null");
return (Criteria) this;
}
public Criteria andDelFlagIsNotNull() {
addCriterion("del_flag is not null");
return (Criteria) this;
}
public Criteria andDelFlagEqualTo(String value) {
addCriterion("del_flag =", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotEqualTo(String value) {
addCriterion("del_flag <>", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThan(String value) {
addCriterion("del_flag >", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagGreaterThanOrEqualTo(String value) {
addCriterion("del_flag >=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThan(String value) {
addCriterion("del_flag <", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLessThanOrEqualTo(String value) {
addCriterion("del_flag <=", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagLike(String value) {
addCriterion("del_flag like", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotLike(String value) {
addCriterion("del_flag not like", value, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagIn(List<String> values) {
addCriterion("del_flag in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotIn(List<String> values) {
addCriterion("del_flag not in", values, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagBetween(String value1, String value2) {
addCriterion("del_flag between", value1, value2, "delFlag");
return (Criteria) this;
}
public Criteria andDelFlagNotBetween(String value1, String value2) {
addCriterion("del_flag not between", value1, value2, "delFlag");
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);
}
}
}
\ No newline at end of file
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/24
* description:
*/
@Data
public class QueryAtlTimeCountParam implements Serializable {
@ApiModelProperty(value = "用户id")
private Long userId;
@ApiModelProperty(value = "状态 0-删除 1-正常")
private Integer status;
}
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/24
* description:
*/
@Data
public class QueryAtlTimeMessageParam implements Serializable {
@ApiModelProperty(value = "类型 1-时光纪 2-文章")
private Integer objType;
@ApiModelProperty(value = "关联类型的相关id")
private Long objId;
@ApiModelProperty(value = "时光纪关联用户id")
private Long toUserId;
}
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/24
* description:
*/
@Data
public class QueryMsgMainParam implements Serializable {
@ApiModelProperty(value = "类型 1-系统消息 2-提醒消息 3-社交消息 4-用户中心系统消息")
private Integer type;
}
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/25
* description:
*/
@Data
public class QueryReleaseArticleParam implements Serializable {
@ApiModelProperty(value = "传入json数据")
private String json;
}
package com.hwstudio.antaile.service;
import com.alibaba.fastjson.JSON;
import com.hwstudio.antaile.utils.JsonResult;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.xml.sax.InputSource;
import java.io.StringReader;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author xh
* @Date 2021/6/22
* description:
*/
@Service
public class AtlNotifyService {
private static Logger logger = LoggerFactory.getLogger(AtlNotifyService.class);
/**
* 处理微信回调结果
*
* @param notifyXml
* @return
*/
@Transactional(rollbackFor = Exception.class)
public JsonResult dealWxpayNotify(String notifyXml) {
if (notifyXml.isEmpty()) {
return JsonResult.failed("回调结果为空");
}
logger.info("微信支付回调");
logger.info("notifyXml:{}", notifyXml);
//回调产生的参数
Map<String, String> data = parseXmlToList2(notifyXml);
logger.info("拿到的map为", JSON.toJSONString(data));
//微信创建统一订单时候产生的参数
// Map<String, String> attach = this.jsonStringToMap(data.get("attach"));
//获得订单号
String outTradeNo = data.get("out_trade_no");
String thirdOrderNo = data.get("transaction_id");
return JsonResult.success("回调成功",data);
}
/**
* 将返回的Xml转成map
*
* @param xml
* @return
*/
private Map parseXmlToList2(String xml) {
Map retMap = new HashMap();
try {
StringReader read = new StringReader(xml);
// 创建新的输入源SAX 解析器将使用 InputSource 对象来确定如何读取 XML 输入
InputSource source = new InputSource(read);
// 创建一个新的SAXBuilder
SAXBuilder sb = new SAXBuilder();
// 通过输入源构造一个Document
Document doc = (Document) sb.build(source);
Element root = doc.getRootElement();// 指向根节点
List<Element> es = root.getChildren();
if (es != null && es.size() != 0) {
for (Element element : es) {
retMap.put(element.getName(), element.getValue());
}
}
} catch (Exception e) {
e.printStackTrace();
}
return retMap;
}
}
......@@ -3,6 +3,7 @@ package com.hwstudio.antaile.service;
import com.github.binarywang.java.emoji.EmojiConverter;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import com.hwstudio.antaile.dto.AtlSearchDto;
......@@ -13,7 +14,13 @@ import com.hwstudio.antaile.mapper.AtlTimeArticleMapper;
import com.hwstudio.antaile.mapper.AtlTimeMapper;
import com.hwstudio.antaile.mapper.AtlTimeMessageMapper;
import com.hwstudio.antaile.mapper.DictMapper;
import com.hwstudio.antaile.mbg.mapper.SysAtlTimeMessageMapper;
import com.hwstudio.antaile.mbg.po.SysAtlTimeMessage;
import com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam;
import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.Page;
import com.hwstudio.antaile.vo.AtlTimeMessageVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
......@@ -38,6 +45,8 @@ public class AtlTimeMessageService {
private AtlTimeMapper atlTimeMapper;
@Resource
private AtlTimeArticleMapper atlTimeArticleMapper;
@Resource
private SysAtlTimeMessageMapper sysAtlTimeMessageMapper;
private EmojiConverter emojiConverter = EmojiConverter.getInstance();
......@@ -158,4 +167,45 @@ public class AtlTimeMessageService {
atlTimeMessageMapper.updateReadFlag(userId);
return JsonResult.success("更新阅读状态成功");
}
/**
* 分页查询留言List 不分页不传递分页参数
*
* @param queryAtlTimeMessageParam
* @param page
* @return
*/
public CommonPage<AtlTimeMessageVO> queryAtlTimeMessageListByPage(QueryAtlTimeMessageParam queryAtlTimeMessageParam, Page page) {
if (page != null && page.getPageNum() != null && page.getPageSize() != null) {
PageHelper.startPage(page.getPageNum(), page.getPageSize());
}
List<AtlTimeMessageVO> atlTimeMessageVOList = this.atlTimeMessageMapper.queryAtlTimeMessageList(queryAtlTimeMessageParam);
//记录下 pagehelper第一次分页查询的 返回得总条数 等信息
PageInfo<AtlTimeMessageVO> pageInfo = new PageInfo<>(atlTimeMessageVOList);
//因为进行了第二次查询 所以pageHelp得分页总数得到了变化 导致不准确 因此我们需要手动校准一下
CommonPage<AtlTimeMessageVO> result = new CommonPage<AtlTimeMessageVO>();
result.setTotalPage(pageInfo.getPages());
result.setPageNum(pageInfo.getPageNum());
result.setPageSize(pageInfo.getPageSize());
result.setTotal(pageInfo.getTotal());
result.setList(atlTimeMessageVOList);
return result;
}
/**
* 根据id 修改一条安泰乐的留言数据
*
* @param sysAtlTimeMessage
* @return
*/
public JsonResult updateAtlTimeMessageById(SysAtlTimeMessage sysAtlTimeMessage) {
if(sysAtlTimeMessage.getId() == null ){
return JsonResult.failed("传入id为空");
}
this.sysAtlTimeMessageMapper.updateByPrimaryKeySelective(sysAtlTimeMessage);
return JsonResult.success("操作成功" );
}
}
......@@ -10,6 +10,7 @@ import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.*;
import com.hwstudio.antaile.exception.BusinessException;
import com.hwstudio.antaile.mapper.*;
import com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam;
import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.vo.AtlFineVo;
......@@ -25,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* Created by LENOVO on 2019/5/27.
......@@ -61,7 +61,7 @@ public class AtlTimeService {
* @param atlTimeVo
*/
@Transactional(rollbackFor = Exception.class)
public void addTime(AtlTimeVo atlTimeVo, Long userId) {
public AtlTime addTime(AtlTimeVo atlTimeVo, Long userId) {
//判空
Preconditions.checkState(StringUtil.isNotEmpty(atlTimeVo.getName()), "时光纪名称不能为空");
......@@ -114,7 +114,7 @@ public class AtlTimeService {
atlPrivateMapper.insert(atlPrivate);
}
return atlTime;
}
/**
......@@ -823,5 +823,25 @@ public class AtlTimeService {
return this.atlTimeMapper.selectRandomAtlTime();
}
/**
* 查询我的待办相关时光纪数据
*
* @return
*/
public JsonResult selectAtlTimeCountMap(Long userId) {
if(userId == null){
return JsonResult.failed("传入userId为空");
}
Map<String,Object> map = new HashMap<>();
QueryAtlTimeCountParam queryAtlTimeCountParam = new QueryAtlTimeCountParam();
queryAtlTimeCountParam.setUserId(userId);
map.put("创建的纪念馆",this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam));
queryAtlTimeCountParam.setStatus(1);
map.put("管理的纪念馆",this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam) );
map.put("关注的纪念馆",this.atlTimeLikeMapper.selectAtlTimeLikeCount(userId) );
map.put("纪念馆访问人数",this.atlTimeMapper.selectAtlTimeReadCountByUserId(userId) );
return JsonResult.success("查询成功",map);
}
}
package com.hwstudio.antaile.service;
import com.alibaba.fastjson.JSON;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.hwstudio.antaile.common.Constants;
import com.hwstudio.antaile.dto.AccessTokenParam;
import com.hwstudio.antaile.dto.LoginUserDto;
import com.hwstudio.antaile.dto.WxInsertUserParam;
import com.hwstudio.antaile.dto.WxPayCreateOrderQureyParam;
import com.hwstudio.antaile.entity.AtlUser;
import com.hwstudio.antaile.entity.Sms;
import com.hwstudio.antaile.exception.BusinessException;
......@@ -14,11 +20,14 @@ import com.hwstudio.antaile.utils.HttpUtils;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.RedisUtil;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
......@@ -30,12 +39,31 @@ import java.util.UUID;
@Service
public class AtlWxService {
private static Logger logger = LoggerFactory.getLogger(AtlWxService.class);
//网站应用appid
@Value("${spring.wx.appid}")
private String appid;
//网站应用appSecret
@Value("${spring.wx.appSecret}")
private String appSecret;
//网站应用回调url
@Value("${spring.wx.redirectUri}")
private String redirectUri;
//公众号appid
@Value("${spring.wx.officeAppid}")
private String officeAppid;
//公众号appSecert
@Value("${spring.wx.officeAppSecert}")
private String officeAppSecert;
//回调地址
@Value("${spring.wx.notifyUrl}")
private String notifyUrl;
//商户id
@Value("${spring.wx.mchId}")
private String mchId;
//商户密钥
@Value("${spring.wx.mchKey}")
private String mchKey;
//获取accessTokenUrl
private String getAccessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token";
//获取用户信息Url
......@@ -60,16 +88,21 @@ public class AtlWxService {
/**
* 获取accessToken
*
* @param code 微信换取accessToken code 必传
* @param state 微信换取accessToken state 非必传
* @param type 获取accessToken 来源 1表示网页应用 2表示公众号
* @return
*/
@Transactional(rollbackFor = Exception.class)
public JsonResult getAccessToken(String code, String state) {
public JsonResult getAccessToken(String code, String state, Integer type) {
AccessTokenParam accessTokenParam = new AccessTokenParam();
accessTokenParam.setAppid(appid);
accessTokenParam.setSecret(appSecret);
accessTokenParam.setCode(code);
accessTokenParam.setGrant_type("authorization_code");
String accessTokenRes = HttpUtils.get(getAccessTokenUrl + "?appid=" + appid + "&secret=" + appSecret + "&code=" + code + "&grant_type=authorization_code");
//{"access_token":"46_YO-dw944jRczqb2SBfIxqRWRYaAClhDV9oLm98RHLYlBrvMzmCmh9Z8ga_6BJm35xjx65oymvZ2LHo8lUkBebD1qZdCA5dV_8igkBTJJ-t4",
// "refresh_token":"46_xIwIY18yjxTNyAfOoWXDdtXTquk63Wwm5w-ASBsCuGh3ov2yrEi5-hDUsBZT6uE_l4c881ux3PeYKyEo1u9hgKuhpSJZTKbYwu3tCS8Dwp0","unionid":"oMKkr6Dkxr4gwkAJBAkd4ctJprWg","openid":"onUQk6gm0ALTXFtddQrikfhmivR0","scope":"snsapi_login","expires_in":7200}
//将返回数据 转成map 获取accessToken数据
Map dataMap = (Map) JSON.parse(accessTokenRes);
String accessToken = (String) dataMap.get("access_token");
......@@ -81,7 +114,13 @@ public class AtlWxService {
AtlUser atlUser = atlUserMapper.getByWebappOpenId(openid);
//如果是新用户 需要去绑定手机号 和 密码
if (atlUser == null) {
return JsonResult.failed("未查询到网站应用openId相关数据,需要绑定手机号", dataMap);
String msg = "";
if (type.equals(1)) {
msg = "未查询到网站应用openId相关数据,需要绑定手机号";
} else {
msg = "未查询到公众号openId相关数据,需要绑定手机号";
}
return JsonResult.failed(msg, dataMap);
} else {
//否则有查询到 就登录成功
LoginUserDto loginUserDto = new LoginUserDto();
......@@ -121,25 +160,37 @@ public class AtlWxService {
//需要判断是否存在手机号 存在则修改 不存在新增
AtlUser atlUser = this.atlUserMapper.selectOneUserByMobilePhone(wxInsertUserParam.getMobilePhone());
AtlUser insertAtlUser = new AtlUser();
if(atlUser != null){
if (atlUser != null) {
//修改操作
atlUser.setNickName(userMap.get("nickname") + "");
//判断插入来源 1表示网页应用 2表示公众号
if (wxInsertUserParam.getType().equals(1)) {
atlUser.setWebappOpenId(userMap.get("openid") + "");
} else if (wxInsertUserParam.getType().equals(2)) {
atlUser.setOfficeOpenId(userMap.get("openid") + "");
}
atlUser.setAvaterImageUrl(userMap.get("headimgurl") + "");
atlUser.setState(1);
atlUser.setSex((Integer) userMap.get("sex"));
atlUser.setMobilePhone(wxInsertUserParam.getMobilePhone());
atlUser.setLoginPassword(DigestUtils.md5Hex(wxInsertUserParam.getLoginPassword()));
atlUser.setUnionid(userMap.get("unionid") + "");
this.atlUserMapper.updateUser(atlUser);
}else{
} else {
//向数据库写入会员信息
insertAtlUser.setNickName(userMap.get("nickname") + "");
insertAtlUser.setWebappOpenId(userMap.get("openid") + "");
//判断插入来源 1表示网页应用 2表示公众号
if (wxInsertUserParam.getType().equals(1)) {
atlUser.setWebappOpenId(userMap.get("openid") + "");
} else if (wxInsertUserParam.getType().equals(2)) {
atlUser.setOfficeOpenId(userMap.get("openid") + "");
}
insertAtlUser.setAvaterImageUrl(userMap.get("headimgurl") + "");
insertAtlUser.setState(1);
insertAtlUser.setSex((Integer) userMap.get("sex"));
insertAtlUser.setMobilePhone(wxInsertUserParam.getMobilePhone());
insertAtlUser.setLoginPassword(DigestUtils.md5Hex(wxInsertUserParam.getLoginPassword()));
insertAtlUser.setUnionid(userMap.get("unionid") + "");
this.atlUserMapper.insert(insertAtlUser);
}
......@@ -156,6 +207,80 @@ public class AtlWxService {
}
/**
* 公众号jsapi支付
*
* @param wxPayCreateOrderQureyParam
* @return
*/
@Transactional(rollbackFor = Exception.class)
public JsonResult officeWxPayByJsapi(WxPayCreateOrderQureyParam wxPayCreateOrderQureyParam) {
JsonResult res = this.checkOfficeWxPayByJsapi(wxPayCreateOrderQureyParam);
if (res.getStatus().equals(Constants.RESPONSE_STATUS_500)) {
return res;
}
//需要查询用户openId信息
AtlUser atlUser = this.atlUserMapper.getAtlUserInfo(wxPayCreateOrderQureyParam.getUserId());
if(atlUser == null){
return JsonResult.failed("传入用户id有误");
}
if(atlUser.getOfficeOpenId() == null || atlUser.getOfficeOpenId().isEmpty()){
return JsonResult.failed("公众号openId为空-需要重新绑定手机号登录");
}
String body = "微信支付订单号为:" + wxPayCreateOrderQureyParam.getOutTradeNo();
//设置订单生成请求参数
WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
orderRequest.setBody(body);
orderRequest.setOpenid(atlUser.getOfficeOpenId());
orderRequest.setTradeType("JSAPI");
orderRequest.setOutTradeNo(wxPayCreateOrderQureyParam.getOutTradeNo());
orderRequest.setTotalFee(wxPayCreateOrderQureyParam.getTotalFee().intValue());
orderRequest.setNotifyUrl(notifyUrl);
orderRequest.setSpbillCreateIp(wxPayCreateOrderQureyParam.getRemoteAdd());
//设置微信配置参数
WxPayConfig payConfig = new WxPayConfig();
payConfig.setAppId(officeAppid);
payConfig.setTradeType("JSAPI");
payConfig.setMchId(mchId);
payConfig.setMchKey(mchKey);
//new 出微信公共创建方法
WxPayService wxPayService = new com.github.binarywang.wxpay.service.impl.WxPayServiceImpl();
wxPayService.setConfig(payConfig);
logger.info("请求参数" + JSON.toJSONString(orderRequest));
Map<String, String> payMap = new HashMap<>();
//生成签名参数
WxPayMpOrderResult result = null;
try {
result = wxPayService.createOrder(orderRequest);
payMap.put("appId",result.getAppId());
payMap.put("timeStamp", result.getTimeStamp());
payMap.put("nonceStr",result.getNonceStr());
payMap.put("packageValue",result.getPackageValue());
payMap.put("signType",result.getSignType());
payMap.put("paySign",result.getPaySign());
//插入第三方流水信息
logger.info("返回数据" + JSON.toJSONString(result));
} catch (WxPayException e) {
e.printStackTrace();
}
return JsonResult.success("操作成功",payMap );
}
private JsonResult checkOfficeWxPayByJsapi(WxPayCreateOrderQureyParam wxPayCreateOrderQureyParam){
if(wxPayCreateOrderQureyParam.getOutTradeNo() == null || wxPayCreateOrderQureyParam.getOutTradeNo().isEmpty()){
return JsonResult.failed("传入订单号为空");
}
if(wxPayCreateOrderQureyParam.getTotalFee() == null){
return JsonResult.failed("传入订单金额为空");
}
if(wxPayCreateOrderQureyParam.getUserId() == null ){
return JsonResult.failed("传入用户id为空");
}
return JsonResult.success("校验通过");
}
/**
* 校验通过
*
* @param wxInsertUserParam
......@@ -171,9 +296,6 @@ public class AtlWxService {
if (wxInsertUserParam.getMobilePhone() == null || wxInsertUserParam.getMobilePhone().isEmpty()) {
return JsonResult.failed("传入mobilePhone为空");
}
if (wxInsertUserParam.getLoginPassword() == null || wxInsertUserParam.getLoginPassword().isEmpty()) {
return JsonResult.failed("传入loginPassword为空");
}
if (wxInsertUserParam.getVerifyCode() == null || wxInsertUserParam.getVerifyCode().isEmpty()) {
return JsonResult.failed("传入验证码为空");
} else {
......@@ -182,7 +304,11 @@ public class AtlWxService {
throw new BusinessException("验证码错误");
}
}
if (wxInsertUserParam.getType() == null) {
return JsonResult.failed("传入type为空");
}
return JsonResult.success("校验通过");
}
}
package com.hwstudio.antaile.service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hwstudio.antaile.entity.MsgMain;
import com.hwstudio.antaile.mbg.mapper.SysMsgMainMapper;
import com.hwstudio.antaile.mbg.po.SysMsgMain;
import com.hwstudio.antaile.mbg.po.SysMsgMainExample;
import com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam;
import com.hwstudio.antaile.queryparam.QueryMsgMainParam;
import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.Page;
import com.hwstudio.antaile.vo.AtlTimeMessageVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author xh
* @Date 2021/6/24
* description:
*/
@Service
public class MsgMainService {
@Resource
private SysMsgMainMapper sysMsgMainMapper;
/**
* 分页查询系统消息List 不分页不传递分页参数
*
* @param queryMsgMainParam
* @param page
* @return
*/
public CommonPage<SysMsgMain> queryMsgMainListByPage(QueryMsgMainParam queryMsgMainParam, Page page) {
if (page != null && page.getPageNum() != null && page.getPageSize() != null) {
PageHelper.startPage(page.getPageNum(), page.getPageSize());
}
SysMsgMainExample example = new SysMsgMainExample();
SysMsgMainExample.Criteria criteria = example.createCriteria();
criteria.andDelFlagEqualTo("0");
if(queryMsgMainParam.getType() != null){
criteria.andTypeEqualTo(queryMsgMainParam.getType());
}
List<SysMsgMain> sysMsgMainList = this.sysMsgMainMapper.selectByExample(example);
//记录下 pagehelper第一次分页查询的 返回得总条数 等信息
PageInfo<SysMsgMain> pageInfo = new PageInfo<>(sysMsgMainList);
//因为进行了第二次查询 所以pageHelp得分页总数得到了变化 导致不准确 因此我们需要手动校准一下
CommonPage<SysMsgMain> result = new CommonPage<SysMsgMain>();
result.setTotalPage(pageInfo.getPages());
result.setPageNum(pageInfo.getPageNum());
result.setPageSize(pageInfo.getPageSize());
result.setTotal(pageInfo.getTotal());
result.setList(sysMsgMainList);
return result;
}
}
......@@ -25,7 +25,7 @@ public class RegisterService {
@Autowired
private SmsMapper smsMapper;
public void registerMobile(String mobile, String pwd, String verifyCode, String nickName) {
public void registerMobile(String mobile, String pwd, String verifyCode, String nickName,Long fromTimeid,Long fromUserid) {
// if (!VerificationUtil.isMobile(mobile)) {
// throw new BusinessException("手机号无效");
// }
......
package com.hwstudio.antaile.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 公共工具类
*
* @Author xh
* @Date 2021/6/22
* description:
*/
public class CommonUtils {
/**
* 生成订单号
*
* @return
*/
public static String generateOrderNo() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String date = sdf.format(new Date());
String timeStamp = System.currentTimeMillis() + "";
String random = Math.round((Math.random() + 1) * 1000) + "";
return date + timeStamp.substring(timeStamp.length() - 4) + random;
}
}
......@@ -12,7 +12,7 @@ import lombok.Data;
*/
@Data
@ApiModel
public class JsonResult {
public class JsonResult<T> {
@ApiModelProperty(name = "success", value = "是否正常通讯")
private Boolean success = Boolean.TRUE;
@ApiModelProperty(name = "status", value = "状态码,200:OK,401:未登录,500:错误")
......
package com.hwstudio.antaile.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author xh
* @Date 2021/6/24
* description:
*/
@Data
public class AtlTimeMessageVO implements Serializable {
@ApiModelProperty(value = "留言id")
private Long id;
@ApiModelProperty(value = "留言内容")
private String content;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "类型 1-时光纪 2-文章")
private Integer objType;
@ApiModelProperty(value = "关联类型的相关id")
private Long objId;
@ApiModelProperty(value = "时光纪关联用户id")
private Long toUserId;
@ApiModelProperty(value = "状态 0-未审核 1-审核通过 2-审核不通过")
private Integer state;
@ApiModelProperty(value = "0:未读 1:已读")
private String readFlag;
@ApiModelProperty(value = "时光纪名称")
private String atlTimeName;
@ApiModelProperty(value = "评论用户头像")
private String avaterImageUrl;
@ApiModelProperty(value = "评论用户昵称")
private String nickName;
}
......@@ -70,11 +70,18 @@ spring:
# 连接超时时间(毫秒)
timeout: 5000
wx:
#此处为微信开放平台相关参数
#此处为微信开放平台----网页应用的配置相关参数
appid: wx27928349186b6267
appSecret: dee9b11ee545bff614abc91ebb042127
redirectUri: https://appapi.antaile.net/wx/returnQrcodeAndState
#此处为微信公众号相关参数
officeAppid: wxbd6cf7b619de70d9
officeAppSecert: 79a5044ac7856522eacc9f824013febb
#微信支付回调地址
notifyUrl: http://appapi.antaile.net/wx/notify
#商户信息
mchId: 1312767401
mchKey: 1234567890ABCDEFGHIJabcdefghijkl
server:
port: 8088
......
......@@ -25,4 +25,11 @@
VALUES(#{timeId}, #{userId}, NOW())
</insert>
<select id="selectAtlTimeLikeCount" parameterType="java.lang.Long" resultType="java.lang.Long">
select
count(*)
from atl_time_like
where user_id = #{userId}
</select>
</mapper>
\ No newline at end of file
......@@ -286,5 +286,22 @@
LIMIT 3
</select>
<select id="selectCountAtlTime" resultType="java.lang.Long" parameterType="com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam" >
select
count(*)
from atl_time
where 1 = 1
<if test="userId != null">
and user_id = #{userId}
</if>
<if test=" status != null">
and status =#{status}
</if>
</select>
<select id="selectAtlTimeReadCountByUserId" parameterType="java.lang.Long" resultType="java.lang.Long" >
select IFNULL(sum(read_count),0) from atl_time
where user_id =#{userId}
and status = 1
</select>
</mapper>
\ No newline at end of file
......@@ -109,4 +109,25 @@
</where>
ORDER BY m.create_time DESC
</select>
<select id="queryAtlTimeMessageList" parameterType="com.hwstudio.antaile.queryparam.QueryAtlTimeMessageParam" resultType="com.hwstudio.antaile.vo.AtlTimeMessageVO">
select
a.id,a.content,a.obj_type objType,a.obj_id objId,a.create_time createTime,a.state,a.toUserId,a.read_flag readFlag,
b.name atlTimeName,
c.avater_image_url avaterImageUrl,c.nick_name nickName
from atl_time_message a
left join atl_time b ON a.obj_id = b.id
left join atl_user c ON a.userId = c.id
where 1 = 1
<if test="objType != null">
and a.obj_type =#{objType}
</if>
<if test="objId != null">
and a.obj_id =#{objId}
</if>
<if test="toUserId != null">
and a.toUserId=#{toUserId}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -10,8 +10,22 @@
</select>
<insert id="registerMobile" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
INSERT INTO atl_user(mobile_phone, login_password , create_time, nick_name, clientId, is_sys_push, is_sc_push, is_rem_push)
VALUES(#{mobilePhone}, #{loginPassword}, NOW(), #{nickName}, #{clientId}, '0', '0', '0')
INSERT INTO atl_user(mobile_phone, login_password , create_time, nick_name, clientId, is_sys_push, is_sc_push, is_rem_push
<if test="fromTimeid != null">
,from_timeid
</if>
<if test="fromUserid != null">
,from_userid
</if>
)
VALUES(#{mobilePhone}, #{loginPassword}, NOW(), #{nickName}, #{clientId}, '0', '0', '0'
<if test="fromTimeid != null">
,#{fromTimeid}
</if>
<if test="fromUserid != null">
,#{fromUserid}
</if>
)
</insert>
<select id="getUserInfo" resultType="com.hwstudio.antaile.dto.AtlUserInfoDto">
......@@ -138,6 +152,10 @@
SELECT * FROM atl_user WHERE webapp_open_id = #{webappOpenId}
</select>
<select id="getByUnionid" resultType="com.hwstudio.antaile.entity.AtlUser" parameterType="java.lang.String">
SELECT * FROM atl_user WHERE unionid = #{unionid}
</select>
<update id="updatePwd">
UPDATE atl_user SET
login_password = #{pwd}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hwstudio.antaile.mbg.mapper.SysAtlTimeArticleMapper">
<resultMap id="BaseResultMap" type="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="time_id" jdbcType="BIGINT" property="timeId" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="label" jdbcType="VARCHAR" property="label" />
<result column="privacy_setting" jdbcType="TINYINT" property="privacySetting" />
<result column="occur_time" jdbcType="DATE" property="occurTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="collection" jdbcType="INTEGER" property="collection" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, time_id, type, title, author, label, privacy_setting, occur_time, del_flag, remark,
create_date, update_date, user_id, collection
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticleExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from atl_time_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticleExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from atl_time_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from atl_time_article
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from atl_time_article
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticleExample">
delete from atl_time_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_time_article (time_id, type, title,
author, label, privacy_setting,
occur_time, del_flag, remark,
create_date, update_date, user_id,
collection, content)
values (#{timeId,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{title,jdbcType=VARCHAR},
#{author,jdbcType=VARCHAR}, #{label,jdbcType=VARCHAR}, #{privacySetting,jdbcType=TINYINT},
#{occurTime,jdbcType=DATE}, #{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
#{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP}, #{userId,jdbcType=BIGINT},
#{collection,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_time_article
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="timeId != null">
time_id,
</if>
<if test="type != null">
type,
</if>
<if test="title != null">
title,
</if>
<if test="author != null">
author,
</if>
<if test="label != null">
label,
</if>
<if test="privacySetting != null">
privacy_setting,
</if>
<if test="occurTime != null">
occur_time,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="remark != null">
remark,
</if>
<if test="createDate != null">
create_date,
</if>
<if test="updateDate != null">
update_date,
</if>
<if test="userId != null">
user_id,
</if>
<if test="collection != null">
collection,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="timeId != null">
#{timeId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="label != null">
#{label,jdbcType=VARCHAR},
</if>
<if test="privacySetting != null">
#{privacySetting,jdbcType=TINYINT},
</if>
<if test="occurTime != null">
#{occurTime,jdbcType=DATE},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
#{createDate,jdbcType=TIMESTAMP},
</if>
<if test="updateDate != null">
#{updateDate,jdbcType=TIMESTAMP},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="collection != null">
#{collection,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticleExample" resultType="java.lang.Long">
select count(*) from atl_time_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update atl_time_article
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.timeId != null">
time_id = #{record.timeId,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.author != null">
author = #{record.author,jdbcType=VARCHAR},
</if>
<if test="record.label != null">
label = #{record.label,jdbcType=VARCHAR},
</if>
<if test="record.privacySetting != null">
privacy_setting = #{record.privacySetting,jdbcType=TINYINT},
</if>
<if test="record.occurTime != null">
occur_time = #{record.occurTime,jdbcType=DATE},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createDate != null">
create_date = #{record.createDate,jdbcType=TIMESTAMP},
</if>
<if test="record.updateDate != null">
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.collection != null">
collection = #{record.collection,jdbcType=INTEGER},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update atl_time_article
set id = #{record.id,jdbcType=BIGINT},
time_id = #{record.timeId,jdbcType=BIGINT},
type = #{record.type,jdbcType=TINYINT},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
label = #{record.label,jdbcType=VARCHAR},
privacy_setting = #{record.privacySetting,jdbcType=TINYINT},
occur_time = #{record.occurTime,jdbcType=DATE},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
create_date = #{record.createDate,jdbcType=TIMESTAMP},
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
user_id = #{record.userId,jdbcType=BIGINT},
collection = #{record.collection,jdbcType=INTEGER},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update atl_time_article
set id = #{record.id,jdbcType=BIGINT},
time_id = #{record.timeId,jdbcType=BIGINT},
type = #{record.type,jdbcType=TINYINT},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
label = #{record.label,jdbcType=VARCHAR},
privacy_setting = #{record.privacySetting,jdbcType=TINYINT},
occur_time = #{record.occurTime,jdbcType=DATE},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
create_date = #{record.createDate,jdbcType=TIMESTAMP},
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
user_id = #{record.userId,jdbcType=BIGINT},
collection = #{record.collection,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
update atl_time_article
<set>
<if test="timeId != null">
time_id = #{timeId,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="label != null">
label = #{label,jdbcType=VARCHAR},
</if>
<if test="privacySetting != null">
privacy_setting = #{privacySetting,jdbcType=TINYINT},
</if>
<if test="occurTime != null">
occur_time = #{occurTime,jdbcType=DATE},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
create_date = #{createDate,jdbcType=TIMESTAMP},
</if>
<if test="updateDate != null">
update_date = #{updateDate,jdbcType=TIMESTAMP},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="collection != null">
collection = #{collection,jdbcType=INTEGER},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
update atl_time_article
set time_id = #{timeId,jdbcType=BIGINT},
type = #{type,jdbcType=TINYINT},
title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
label = #{label,jdbcType=VARCHAR},
privacy_setting = #{privacySetting,jdbcType=TINYINT},
occur_time = #{occurTime,jdbcType=DATE},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
create_date = #{createDate,jdbcType=TIMESTAMP},
update_date = #{updateDate,jdbcType=TIMESTAMP},
user_id = #{userId,jdbcType=BIGINT},
collection = #{collection,jdbcType=INTEGER},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeArticle">
update atl_time_article
set time_id = #{timeId,jdbcType=BIGINT},
type = #{type,jdbcType=TINYINT},
title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
label = #{label,jdbcType=VARCHAR},
privacy_setting = #{privacySetting,jdbcType=TINYINT},
occur_time = #{occurTime,jdbcType=DATE},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
create_date = #{createDate,jdbcType=TIMESTAMP},
update_date = #{updateDate,jdbcType=TIMESTAMP},
user_id = #{userId,jdbcType=BIGINT},
collection = #{collection,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hwstudio.antaile.mbg.mapper.SysAtlTimeMessageMapper">
<resultMap id="BaseResultMap" type="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="userId" jdbcType="BIGINT" property="userid" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="obj_type" jdbcType="INTEGER" property="objType" />
<result column="obj_id" jdbcType="BIGINT" property="objId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="state" jdbcType="TINYINT" property="state" />
<result column="toUserId" jdbcType="BIGINT" property="touserid" />
<result column="read_flag" jdbcType="CHAR" property="readFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, userId, del_flag, obj_type, obj_id, create_time, state, toUserId, read_flag
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessageExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from atl_time_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessageExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from atl_time_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from atl_time_message
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from atl_time_message
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessageExample">
delete from atl_time_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_time_message (userId, del_flag, obj_type,
obj_id, create_time, state,
toUserId, read_flag, content
)
values (#{userid,jdbcType=BIGINT}, #{delFlag,jdbcType=TINYINT}, #{objType,jdbcType=INTEGER},
#{objId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{state,jdbcType=TINYINT},
#{touserid,jdbcType=BIGINT}, #{readFlag,jdbcType=CHAR}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_time_message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userid != null">
userId,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="objType != null">
obj_type,
</if>
<if test="objId != null">
obj_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="state != null">
state,
</if>
<if test="touserid != null">
toUserId,
</if>
<if test="readFlag != null">
read_flag,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=TINYINT},
</if>
<if test="objType != null">
#{objType,jdbcType=INTEGER},
</if>
<if test="objId != null">
#{objId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="state != null">
#{state,jdbcType=TINYINT},
</if>
<if test="touserid != null">
#{touserid,jdbcType=BIGINT},
</if>
<if test="readFlag != null">
#{readFlag,jdbcType=CHAR},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessageExample" resultType="java.lang.Long">
select count(*) from atl_time_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update atl_time_message
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userid != null">
userId = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=TINYINT},
</if>
<if test="record.objType != null">
obj_type = #{record.objType,jdbcType=INTEGER},
</if>
<if test="record.objId != null">
obj_id = #{record.objId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.state != null">
state = #{record.state,jdbcType=TINYINT},
</if>
<if test="record.touserid != null">
toUserId = #{record.touserid,jdbcType=BIGINT},
</if>
<if test="record.readFlag != null">
read_flag = #{record.readFlag,jdbcType=CHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update atl_time_message
set id = #{record.id,jdbcType=BIGINT},
userId = #{record.userid,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=TINYINT},
obj_type = #{record.objType,jdbcType=INTEGER},
obj_id = #{record.objId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
state = #{record.state,jdbcType=TINYINT},
toUserId = #{record.touserid,jdbcType=BIGINT},
read_flag = #{record.readFlag,jdbcType=CHAR},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update atl_time_message
set id = #{record.id,jdbcType=BIGINT},
userId = #{record.userid,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=TINYINT},
obj_type = #{record.objType,jdbcType=INTEGER},
obj_id = #{record.objId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
state = #{record.state,jdbcType=TINYINT},
toUserId = #{record.touserid,jdbcType=BIGINT},
read_flag = #{record.readFlag,jdbcType=CHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
update atl_time_message
<set>
<if test="userid != null">
userId = #{userid,jdbcType=BIGINT},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=TINYINT},
</if>
<if test="objType != null">
obj_type = #{objType,jdbcType=INTEGER},
</if>
<if test="objId != null">
obj_id = #{objId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="state != null">
state = #{state,jdbcType=TINYINT},
</if>
<if test="touserid != null">
toUserId = #{touserid,jdbcType=BIGINT},
</if>
<if test="readFlag != null">
read_flag = #{readFlag,jdbcType=CHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
update atl_time_message
set userId = #{userid,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=TINYINT},
obj_type = #{objType,jdbcType=INTEGER},
obj_id = #{objId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
state = #{state,jdbcType=TINYINT},
toUserId = #{touserid,jdbcType=BIGINT},
read_flag = #{readFlag,jdbcType=CHAR},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hwstudio.antaile.mbg.po.SysAtlTimeMessage">
update atl_time_message
set userId = #{userid,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=TINYINT},
obj_type = #{objType,jdbcType=INTEGER},
obj_id = #{objId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
state = #{state,jdbcType=TINYINT},
toUserId = #{touserid,jdbcType=BIGINT},
read_flag = #{readFlag,jdbcType=CHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hwstudio.antaile.mbg.mapper.SysMsgMainMapper">
<resultMap id="BaseResultMap" type="com.hwstudio.antaile.mbg.po.SysMsgMain">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="link_url" jdbcType="VARCHAR" property="linkUrl" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
<result column="type" jdbcType="CHAR" property="type" />
<result column="del_flag" jdbcType="CHAR" property="delFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwstudio.antaile.mbg.po.SysMsgMain">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, title, link_url, create_time, create_user_id, update_time, update_user_id, type,
del_flag
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMainExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from msg_main
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMainExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from msg_main
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from msg_main
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from msg_main
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMainExample">
delete from msg_main
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMain">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into msg_main (title, link_url, create_time,
create_user_id, update_time, update_user_id,
type, del_flag, content
)
values (#{title,jdbcType=VARCHAR}, #{linkUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT},
#{type,jdbcType=CHAR}, #{delFlag,jdbcType=CHAR}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMain">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into msg_main
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="linkUrl != null">
link_url,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="type != null">
type,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="linkUrl != null">
#{linkUrl,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=CHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=CHAR},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMainExample" resultType="java.lang.Long">
select count(*) from msg_main
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update msg_main
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.linkUrl != null">
link_url = #{record.linkUrl,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createUserId != null">
create_user_id = #{record.createUserId,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateUserId != null">
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=CHAR},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=CHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update msg_main
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
link_url = #{record.linkUrl,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_user_id = #{record.createUserId,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
type = #{record.type,jdbcType=CHAR},
del_flag = #{record.delFlag,jdbcType=CHAR},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update msg_main
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
link_url = #{record.linkUrl,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_user_id = #{record.createUserId,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
type = #{record.type,jdbcType=CHAR},
del_flag = #{record.delFlag,jdbcType=CHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMain">
update msg_main
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="linkUrl != null">
link_url = #{linkUrl,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=CHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMain">
update msg_main
set title = #{title,jdbcType=VARCHAR},
link_url = #{linkUrl,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_user_id = #{createUserId,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=BIGINT},
type = #{type,jdbcType=CHAR},
del_flag = #{delFlag,jdbcType=CHAR},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hwstudio.antaile.mbg.po.SysMsgMain">
update msg_main
set title = #{title,jdbcType=VARCHAR},
link_url = #{linkUrl,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_user_id = #{createUserId,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=BIGINT},
type = #{type,jdbcType=CHAR},
del_flag = #{delFlag,jdbcType=CHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment