whycrzg
2021-02-02 42b7c677783af58b4ce81e6611fccbc2336512ab
update
3个文件已修改
47 ■■■■■ 已修改文件
src/main/java/com/fgkj/controller/UserSmsController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fgkj/dto/User_sms.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/UserSmsMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fgkj/controller/UserSmsController.java
@@ -8,10 +8,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -23,8 +20,8 @@
    private User_smsService service;
    //4.9短信息查询
    @GetMapping("byCondition")
    @ApiOperation(notes = "",value="短信息查询")
    @PostMapping("byCondition")
    @ApiOperation(notes = "{ \"uId\": 0, \"sms_send_date\": \"2015-09-01 00:00:00\", \"sms_send_date1\": \"2021-01-13 08:18:04\", \"sms_state\": 0, \"pageBean\": { \"pageSize\": 1, \"pageNum\": 1 } }",value="短信息查询")
    public ServiceModel serchByCondition(@RequestBody User_sms us){
        ServiceModel model=service.serchByCondition(us);
        return model;
src/main/java/com/fgkj/dto/User_sms.java
@@ -10,7 +10,7 @@
    private Integer num;
    private Integer task_id;
    private Integer priority_level;
    private Integer UId;
    private Integer uId;
    private String phone_num;
    private String sms;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
@@ -43,13 +43,15 @@
    public void setPriority_level(Integer priority_level) {
        this.priority_level = priority_level;
    }
    public Integer getuId() {
        return UId;
        return uId;
    }
    public void setuId(Integer uId) {
        UId = uId;
        this.uId = uId;
    }
    public String getPhone_num() {
        return phone_num;
    }
@@ -100,14 +102,22 @@
    public void setPageBean(PageBean pageBean) {
        this.pageBean = pageBean;
    }
    @Override
    public String toString() {
        return "User_sms [num=" + num + ", task_id=" + task_id
                + ", priority_level=" + priority_level + ", UId=" + UId
                + ", phone_num=" + phone_num + ", sms=" + sms
                + ", sms_add_date=" + sms_add_date + ", sms_send_date="
                + sms_send_date + ", sms_send_date1=" + sms_send_date1
                + ", sms_send_err_count=" + sms_send_err_count + ", sms_state="
                + sms_state + ", page=" + pageBean + "]";
        return "User_sms{" +
                "num=" + num +
                ", task_id=" + task_id +
                ", priority_level=" + priority_level +
                ", uId=" + uId +
                ", phone_num='" + phone_num + '\'' +
                ", sms='" + sms + '\'' +
                ", sms_add_date=" + sms_add_date +
                ", sms_send_date=" + sms_send_date +
                ", sms_send_date1=" + sms_send_date1 +
                ", sms_send_err_count=" + sms_send_err_count +
                ", sms_state=" + sms_state +
                ", pageBean=" + pageBean +
                '}';
    }
}
src/main/resources/mapper/UserSmsMapper.xml
@@ -5,7 +5,7 @@
    <result column="num" property="num"></result>
    <result column="task_id" property="task_id"></result>
    <result column="priority_level" property="priority_level"></result>
    <result column="uId" property="UId"></result>
    <result column="uId" property="uId"></result>
    <result column="phone_num" property="phone_num"></result>
    <result column="sms" property="sms"></result>
    <result column="sms_add_date" property="sms_add_date"></result>
@@ -180,8 +180,8 @@
    <select id="serchByCondition" resultMap="BaseResultMap">
        select num,task_id,priority_level,uId,phone_num,sms,sms_add_date,sms_send_date,sms_send_err_count,sms_state from
        db_user.tb_user_sms where (sms_send_date)<![CDATA[>=]]>(#{sms_send_date}) and (sms_send_date)<![CDATA[<=]]>(#{sms_send_date1})
        <if test="UId==0">and uid!=#{UId} </if>
        <if test="UId!=0">and uid=#{UId} </if>
        <if test="uId==0">and uid!=#{uId} </if>
        <if test="uId!=0">and uid=#{uId} </if>
        <if test="sms_state==100">and sms_state!=#{sms_state} </if>
        <if test="sms_state!=100">and sms_state=#{sms_state} </if>
        order by uId asc,sms_add_date asc