正在显示
21 个修改的文件
包含
227 行增加
和
223 行删除
@@ -15,9 +15,6 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur | @@ -15,9 +15,6 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur | ||
15 | public class SecurityConfig extends WebSecurityConfigurerAdapter { | 15 | public class SecurityConfig extends WebSecurityConfigurerAdapter { |
16 | @Override | 16 | @Override |
17 | protected void configure(HttpSecurity http) throws Exception { | 17 | protected void configure(HttpSecurity http) throws Exception { |
18 | - //首页所有人可以访问,功能页只有对应的权限才能访问,本地测试使用 | ||
19 | -// http.authorizeRequests() | ||
20 | -// .antMatchers("/").permitAll(); | ||
21 | http.csrf().disable(); | 18 | http.csrf().disable(); |
22 | } | 19 | } |
23 | } | 20 | } |
@@ -37,10 +37,10 @@ public class CompanyInfoController { | @@ -37,10 +37,10 @@ public class CompanyInfoController { | ||
37 | @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { | 37 | @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { |
38 | ResultJson<PageInfo> result = new ResultJson<>(); | 38 | ResultJson<PageInfo> result = new ResultJson<>(); |
39 | CompanyInfo companyInfo = new CompanyInfo(); | 39 | CompanyInfo companyInfo = new CompanyInfo(); |
40 | - if("".equals(companyName)){ | 40 | + if ("".equals(companyName)) { |
41 | companyInfo.setCompanyName(companyName); | 41 | companyInfo.setCompanyName(companyName); |
42 | } | 42 | } |
43 | - if("".equals(companyMobile)){ | 43 | + if ("".equals(companyMobile)) { |
44 | companyInfo.setCompanyMobile(companyMobile); | 44 | companyInfo.setCompanyMobile(companyMobile); |
45 | } | 45 | } |
46 | PageInfo pageInfo = companyInfoService.selectCompanyInfoList(companyInfo, pageNum, pageSize); | 46 | PageInfo pageInfo = companyInfoService.selectCompanyInfoList(companyInfo, pageNum, pageSize); |
@@ -151,6 +151,7 @@ public class DispatchNoteController { | @@ -151,6 +151,7 @@ public class DispatchNoteController { | ||
151 | } | 151 | } |
152 | return result; | 152 | return result; |
153 | } | 153 | } |
154 | + | ||
154 | @InitBinder | 155 | @InitBinder |
155 | public void initBinder(WebDataBinder binder) { | 156 | public void initBinder(WebDataBinder binder) { |
156 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); | 157 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
@@ -42,14 +42,14 @@ public class DriverInfoController { | @@ -42,14 +42,14 @@ public class DriverInfoController { | ||
42 | @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { | 42 | @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { |
43 | ResultJson<PageInfo> result = new ResultJson<>(); | 43 | ResultJson<PageInfo> result = new ResultJson<>(); |
44 | DriverInfo driverInfo = new DriverInfo(); | 44 | DriverInfo driverInfo = new DriverInfo(); |
45 | - //获取参数,驾驶员姓名 | ||
46 | - driverInfo.setDriverName(driverName); | ||
47 | - //获取参数,驾驶员联系方式 | ||
48 | - driverInfo.setDriverMobile(driverMobile); | ||
49 | - //获取参数,驾驶员所属公司 | ||
50 | - driverInfo.setDriverCompany(driverCompany); | ||
51 | - //获取参数,驾驶员状态 | ||
52 | - driverInfo.setDriverStatus(driverStatus); | 45 | + //获取参数,驾驶员姓名 |
46 | + driverInfo.setDriverName(driverName); | ||
47 | + //获取参数,驾驶员联系方式 | ||
48 | + driverInfo.setDriverMobile(driverMobile); | ||
49 | + //获取参数,驾驶员所属公司 | ||
50 | + driverInfo.setDriverCompany(driverCompany); | ||
51 | + //获取参数,驾驶员状态 | ||
52 | + driverInfo.setDriverStatus(driverStatus); | ||
53 | PageInfo pageInfo = driverInfoService.selectDriverInfoList(driverInfo, pageNum, pageSize); | 53 | PageInfo pageInfo = driverInfoService.selectDriverInfoList(driverInfo, pageNum, pageSize); |
54 | if (pageInfo.getTotal() > 0) { | 54 | if (pageInfo.getTotal() > 0) { |
55 | result.setData(pageInfo); | 55 | result.setData(pageInfo); |
@@ -24,9 +24,9 @@ public class GetUserController { | @@ -24,9 +24,9 @@ public class GetUserController { | ||
24 | private GetUserFegin getUserFegin; | 24 | private GetUserFegin getUserFegin; |
25 | 25 | ||
26 | @GetMapping("/user/getUser") | 26 | @GetMapping("/user/getUser") |
27 | - public ResultJson<PageInfo> getUser(@RequestParam(value = "userName", required = false) String userName, HttpServletRequest request){ | 27 | + public ResultJson<PageInfo> getUser(@RequestParam(value = "userName", required = false) String userName, HttpServletRequest request) { |
28 | String token = request.getHeader("Authorization"); | 28 | String token = request.getHeader("Authorization"); |
29 | - System.out.println(userName+"的token是"+token); | ||
30 | - return getUserFegin.list(userName,token); | 29 | + System.out.println(userName + "的token是" + token); |
30 | + return getUserFegin.list(userName, token); | ||
31 | } | 31 | } |
32 | } | 32 | } |
@@ -44,14 +44,14 @@ public class VehicleInfoController { | @@ -44,14 +44,14 @@ public class VehicleInfoController { | ||
44 | 44 | ||
45 | ResultJson<PageInfo> result = new ResultJson<>(); | 45 | ResultJson<PageInfo> result = new ResultJson<>(); |
46 | VehicleInfo vehicleInfo = new VehicleInfo(); | 46 | VehicleInfo vehicleInfo = new VehicleInfo(); |
47 | - //获取参数,车辆状态 | ||
48 | - vehicleInfo.setVehicleStatus(vehicleStatus); | ||
49 | - //获取参数,车辆类型 | ||
50 | - vehicleInfo.setVehicleType(vehicleType); | ||
51 | - //获取参数,车牌号 | ||
52 | - vehicleInfo.setLicensePlateNumber(licensePlateNumber); | ||
53 | - //获取参数,公司名 | ||
54 | - vehicleInfo.setVehicleCompany(vehicleCompany); | 47 | + //获取参数,车辆状态 |
48 | + vehicleInfo.setVehicleStatus(vehicleStatus); | ||
49 | + //获取参数,车辆类型 | ||
50 | + vehicleInfo.setVehicleType(vehicleType); | ||
51 | + //获取参数,车牌号 | ||
52 | + vehicleInfo.setLicensePlateNumber(licensePlateNumber); | ||
53 | + //获取参数,公司名 | ||
54 | + vehicleInfo.setVehicleCompany(vehicleCompany); | ||
55 | PageInfo pageInfo = vehicleInfoService.selectVehicleInfoList(vehicleInfo, pageNum, pageSize); | 55 | PageInfo pageInfo = vehicleInfoService.selectVehicleInfoList(vehicleInfo, pageNum, pageSize); |
56 | if (pageInfo.getTotal() > 0) { | 56 | if (pageInfo.getTotal() > 0) { |
57 | result.setData(pageInfo); | 57 | result.setData(pageInfo); |
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
13 | * Description: | 13 | * Description: |
14 | * 时间:2020/5/8 16:06 | 14 | * 时间:2020/5/8 16:06 |
15 | */ | 15 | */ |
16 | -@FeignClient(value = "cloud-user-center",fallback = GetUserFeginHystrix.class) | 16 | +@FeignClient(value = "cloud-user-center", fallback = GetUserFeginHystrix.class) |
17 | @Service | 17 | @Service |
18 | public interface GetUserFegin { | 18 | public interface GetUserFegin { |
19 | /** | 19 | /** |
@@ -13,10 +13,10 @@ import org.springframework.web.client.RestTemplate; | @@ -13,10 +13,10 @@ import org.springframework.web.client.RestTemplate; | ||
13 | * 时间:2020/5/8 19:06 | 13 | * 时间:2020/5/8 19:06 |
14 | */ | 14 | */ |
15 | @Service | 15 | @Service |
16 | -public class GetUserFeginHystrix implements GetUserFegin{ | 16 | +public class GetUserFeginHystrix implements GetUserFegin { |
17 | 17 | ||
18 | @Override | 18 | @Override |
19 | - public ResultJson<PageInfo> list(String userName,String token) { | 19 | + public ResultJson<PageInfo> list(String userName, String token) { |
20 | System.out.println("与 CLOUD-USER-CENTER 服务断开连接"); | 20 | System.out.println("与 CLOUD-USER-CENTER 服务断开连接"); |
21 | // throw new RuntimeException(); | 21 | // throw new RuntimeException(); |
22 | return null; | 22 | return null; |
@@ -34,6 +34,7 @@ public class ResultJson<T> implements Serializable { | @@ -34,6 +34,7 @@ public class ResultJson<T> implements Serializable { | ||
34 | * JWT令牌 | 34 | * JWT令牌 |
35 | */ | 35 | */ |
36 | private String jwtToken; | 36 | private String jwtToken; |
37 | + | ||
37 | /** | 38 | /** |
38 | * 无参,构造方法 | 39 | * 无参,构造方法 |
39 | */ | 40 | */ |
@@ -47,6 +48,7 @@ public class ResultJson<T> implements Serializable { | @@ -47,6 +48,7 @@ public class ResultJson<T> implements Serializable { | ||
47 | public ResultJson(String code) { | 48 | public ResultJson(String code) { |
48 | this.code = code; | 49 | this.code = code; |
49 | } | 50 | } |
51 | + | ||
50 | public ResultJson(T data) { | 52 | public ResultJson(T data) { |
51 | this.data = data; | 53 | this.data = data; |
52 | } | 54 | } |
@@ -36,11 +36,11 @@ public class CompanyInfoServiceImpl implements CompanyInfoService { | @@ -36,11 +36,11 @@ public class CompanyInfoServiceImpl implements CompanyInfoService { | ||
36 | */ | 36 | */ |
37 | @Override | 37 | @Override |
38 | public PageInfo selectCompanyInfoList(CompanyInfo companyInfo, Integer pageNum, Integer pageSize) { | 38 | public PageInfo selectCompanyInfoList(CompanyInfo companyInfo, Integer pageNum, Integer pageSize) { |
39 | - /* 获取,公司信息列表 */ | ||
40 | - List<CompanyInfo> companyInfoList = companyInfoMapper.selectCompanyInfoList(companyInfo); | ||
41 | /* 使用 PageHelper 分页插件 */ | 39 | /* 使用 PageHelper 分页插件 */ |
42 | PageHelper.startPage(pageNum, pageSize); | 40 | PageHelper.startPage(pageNum, pageSize); |
43 | - PageInfo<VehicleInfo> pageInfo = new PageInfo(companyInfoList); | 41 | + /* 获取,公司信息列表 */ |
42 | + List<CompanyInfo> companyInfoList = companyInfoMapper.selectCompanyInfoList(companyInfo); | ||
43 | + PageInfo<CompanyInfo> pageInfo = new PageInfo(companyInfoList); | ||
44 | return pageInfo; | 44 | return pageInfo; |
45 | } | 45 | } |
46 | 46 |
@@ -26,11 +26,10 @@ public class DispatchNoteServiceImpl implements DispatchNoteService { | @@ -26,11 +26,10 @@ public class DispatchNoteServiceImpl implements DispatchNoteService { | ||
26 | private DispatchNoteMapper dispatchNoteMapper; | 26 | private DispatchNoteMapper dispatchNoteMapper; |
27 | 27 | ||
28 | @Override | 28 | @Override |
29 | - public PageInfo selectDispatchNoteList(DispatchNote dispatchNote, Integer pageNum, Integer pageSize) { | ||
30 | - List<DispatchNote> dispatchNoteList = dispatchNoteMapper.selectVehicleInfoList(dispatchNote); | ||
31 | - //使用pagehelper | 29 | + public PageInfo<DispatchNote> selectDispatchNoteList(DispatchNote dispatchNote, Integer pageNum, Integer pageSize) { |
32 | PageHelper.startPage(pageNum, pageSize); | 30 | PageHelper.startPage(pageNum, pageSize); |
33 | - PageInfo<VehicleInfo> pageInfo = new PageInfo(dispatchNoteList); | 31 | + List<DispatchNote> dispatchNoteList = dispatchNoteMapper.selectVehicleInfoList(dispatchNote); |
32 | + PageInfo<DispatchNote> pageInfo = new PageInfo<>(dispatchNoteList); | ||
34 | return pageInfo; | 33 | return pageInfo; |
35 | } | 34 | } |
36 | 35 |
@@ -29,10 +29,10 @@ public class DriverInfoServiceImpl implements DriverInfoService { | @@ -29,10 +29,10 @@ public class DriverInfoServiceImpl implements DriverInfoService { | ||
29 | * 分页查询,驾驶员信息列表 | 29 | * 分页查询,驾驶员信息列表 |
30 | */ | 30 | */ |
31 | @Override | 31 | @Override |
32 | - public PageInfo selectDriverInfoList(DriverInfo driverInfo, Integer pageNum, Integer pageSize) { | ||
33 | - List<DriverInfo> driverInfoList = driverInfoMapper.selectDriverInfoList(driverInfo); | 32 | + public PageInfo<DriverInfo> selectDriverInfoList(DriverInfo driverInfo, Integer pageNum, Integer pageSize) { |
34 | PageHelper.startPage(pageNum, pageSize); | 33 | PageHelper.startPage(pageNum, pageSize); |
35 | - PageInfo<VehicleInfo> pageInfo = new PageInfo(driverInfoList); | 34 | + List<DriverInfo> driverInfoList = driverInfoMapper.selectDriverInfoList(driverInfo); |
35 | + PageInfo<DriverInfo> pageInfo = new PageInfo<>(driverInfoList); | ||
36 | return pageInfo; | 36 | return pageInfo; |
37 | } | 37 | } |
38 | 38 |
@@ -53,9 +53,9 @@ public class VehicleInfoServiceImpl implements VehicleInfoService { | @@ -53,9 +53,9 @@ public class VehicleInfoServiceImpl implements VehicleInfoService { | ||
53 | */ | 53 | */ |
54 | @Override | 54 | @Override |
55 | public PageInfo selectVehicleInfoList(VehicleInfo vehicleInfo, Integer pageNum, Integer pageSize) { | 55 | public PageInfo selectVehicleInfoList(VehicleInfo vehicleInfo, Integer pageNum, Integer pageSize) { |
56 | - List<VehicleInfo> vehicleInfoList = vehicleInfoMapper.selectVehicleInfoList(vehicleInfo); | ||
57 | // 使用 PageHelper 分页插件 | 56 | // 使用 PageHelper 分页插件 |
58 | PageHelper.startPage(pageNum, pageSize); | 57 | PageHelper.startPage(pageNum, pageSize); |
58 | + List<VehicleInfo> vehicleInfoList = vehicleInfoMapper.selectVehicleInfoList(vehicleInfo); | ||
59 | PageInfo<VehicleInfo> pageInfo = new PageInfo(vehicleInfoList); | 59 | PageInfo<VehicleInfo> pageInfo = new PageInfo(vehicleInfoList); |
60 | return pageInfo; | 60 | return pageInfo; |
61 | } | 61 | } |
@@ -18,19 +18,20 @@ public class DateTimeUtils { | @@ -18,19 +18,20 @@ public class DateTimeUtils { | ||
18 | 18 | ||
19 | /** | 19 | /** |
20 | * 获取年月日,date类型 | 20 | * 获取年月日,date类型 |
21 | + * | ||
21 | * @param s | 22 | * @param s |
22 | * @return | 23 | * @return |
23 | */ | 24 | */ |
24 | - public static Date getDate(String s){ | 25 | + public static Date getDate(String s) { |
25 | Date time = null; | 26 | Date time = null; |
26 | - if(s == null){ | 27 | + if (s == null) { |
27 | return time; | 28 | return time; |
28 | } | 29 | } |
29 | try { | 30 | try { |
30 | - if (s.length()>0){ | 31 | + if (s.length() > 0) { |
31 | time = simpleDateFormat.parse(s); | 32 | time = simpleDateFormat.parse(s); |
32 | } | 33 | } |
33 | - }catch (Exception e){ | 34 | + } catch (Exception e) { |
34 | e.printStackTrace(); | 35 | e.printStackTrace(); |
35 | } | 36 | } |
36 | return time; | 37 | return time; |
@@ -38,28 +39,30 @@ public class DateTimeUtils { | @@ -38,28 +39,30 @@ public class DateTimeUtils { | ||
38 | 39 | ||
39 | /** | 40 | /** |
40 | * 获取年月日,String类型 | 41 | * 获取年月日,String类型 |
42 | + * | ||
41 | * @param date | 43 | * @param date |
42 | * @return | 44 | * @return |
43 | */ | 45 | */ |
44 | - public static String getDateString(Date date){ | 46 | + public static String getDateString(Date date) { |
45 | return simpleDateFormat.format(date); | 47 | return simpleDateFormat.format(date); |
46 | } | 48 | } |
47 | 49 | ||
48 | /** | 50 | /** |
49 | * 获取当前年月日时分秒,String类型 | 51 | * 获取当前年月日时分秒,String类型 |
52 | + * | ||
50 | * @param date | 53 | * @param date |
51 | * @return | 54 | * @return |
52 | */ | 55 | */ |
53 | - public static String getDateTimeString(Date date){ | 56 | + public static String getDateTimeString(Date date) { |
54 | return simpleDateTimeFormat.format(date); | 57 | return simpleDateTimeFormat.format(date); |
55 | } | 58 | } |
56 | 59 | ||
57 | - public static List getSeverDay(){ | 60 | + public static List getSeverDay() { |
58 | List<Date> dates = new ArrayList<>(); | 61 | List<Date> dates = new ArrayList<>(); |
59 | Date date = new Date(); | 62 | Date date = new Date(); |
60 | dates.add(date); | 63 | dates.add(date); |
61 | - for (int i=1;i<7;i++) { | ||
62 | - long time = date.getTime() - i*24 * 3600 * 1000L; | 64 | + for (int i = 1; i < 7; i++) { |
65 | + long time = date.getTime() - i * 24 * 3600 * 1000L; | ||
63 | Date preTime = new Date(time); | 66 | Date preTime = new Date(time); |
64 | dates.add(preTime); | 67 | dates.add(preTime); |
65 | } | 68 | } |
@@ -8,7 +8,7 @@ import java.util.UUID; | @@ -8,7 +8,7 @@ import java.util.UUID; | ||
8 | * 时间:2020/4/24 17:44 | 8 | * 时间:2020/4/24 17:44 |
9 | */ | 9 | */ |
10 | public class GetUUID { | 10 | public class GetUUID { |
11 | - public static String getuuid(){ | 11 | + public static String getuuid() { |
12 | return UUID.randomUUID().toString().replaceAll("-", ""); | 12 | return UUID.randomUUID().toString().replaceAll("-", ""); |
13 | } | 13 | } |
14 | } | 14 | } |
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.dispatch.mapper.DispatchBusinessMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.dispatch.mapper.DispatchBusinessMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
5 | - <!--@mbg.generated--> | ||
6 | - <!--@Table dispatch_business--> | ||
7 | - <id column="id" jdbcType="VARCHAR" property="id" /> | ||
8 | - <result column="dispatch_type" jdbcType="VARCHAR" property="dispatchType" /> | ||
9 | - </resultMap> | ||
10 | - <sql id="Base_Column_List"> | ||
11 | - <!--@mbg.generated--> | ||
12 | - id, dispatch_type | ||
13 | - </sql> | ||
14 | - <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
15 | - <!--@mbg.generated--> | ||
16 | - select | ||
17 | - <include refid="Base_Column_List" /> | ||
18 | - from dispatch_business | ||
19 | - where id = #{id,jdbcType=VARCHAR} | ||
20 | - </select> | ||
21 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | ||
22 | - <!--@mbg.generated--> | ||
23 | - delete from dispatch_business | ||
24 | - where id = #{id,jdbcType=VARCHAR} | ||
25 | - </delete> | ||
26 | - <insert id="insert" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
27 | - <!--@mbg.generated--> | ||
28 | - insert into dispatch_business (id, dispatch_type) | ||
29 | - values (#{id,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR}) | ||
30 | - </insert> | ||
31 | - <insert id="insertSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
32 | - <!--@mbg.generated--> | ||
33 | - insert into dispatch_business | ||
34 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
35 | - <if test="id != null"> | ||
36 | - id, | ||
37 | - </if> | ||
38 | - <if test="dispatchType != null"> | ||
39 | - dispatch_type, | ||
40 | - </if> | ||
41 | - </trim> | ||
42 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
43 | - <if test="id != null"> | ||
44 | - #{id,jdbcType=VARCHAR}, | ||
45 | - </if> | ||
46 | - <if test="dispatchType != null"> | ||
47 | - #{dispatchType,jdbcType=VARCHAR}, | ||
48 | - </if> | ||
49 | - </trim> | ||
50 | - </insert> | ||
51 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
52 | - <!--@mbg.generated--> | ||
53 | - update dispatch_business | ||
54 | - <set> | ||
55 | - <if test="dispatchType != null"> | ||
56 | - dispatch_type = #{dispatchType,jdbcType=VARCHAR}, | ||
57 | - </if> | ||
58 | - </set> | ||
59 | - where id = #{id,jdbcType=VARCHAR} | ||
60 | - </update> | ||
61 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
62 | - <!--@mbg.generated--> | ||
63 | - update dispatch_business | ||
64 | - set dispatch_type = #{dispatchType,jdbcType=VARCHAR} | ||
65 | - where id = #{id,jdbcType=VARCHAR} | ||
66 | - </update> | ||
67 | - <update id="updateBatch" parameterType="java.util.List"> | ||
68 | - <!--@mbg.generated--> | ||
69 | - update dispatch_business | ||
70 | - <trim prefix="set" suffixOverrides=","> | ||
71 | - <trim prefix="dispatch_type = case" suffix="end,"> | ||
72 | - <foreach collection="list" index="index" item="item"> | ||
73 | - when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR} | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> |
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table dispatch_business--> | ||
7 | + <id column="id" jdbcType="VARCHAR" property="id"/> | ||
8 | + <result column="dispatch_type" jdbcType="VARCHAR" property="dispatchType"/> | ||
9 | + </resultMap> | ||
10 | + <sql id="Base_Column_List"> | ||
11 | + <!--@mbg.generated--> | ||
12 | + id, dispatch_type | ||
13 | + </sql> | ||
14 | + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
15 | + <!--@mbg.generated--> | ||
16 | + select | ||
17 | + <include refid="Base_Column_List"/> | ||
18 | + from dispatch_business | ||
19 | + where id = #{id,jdbcType=VARCHAR} | ||
20 | + </select> | ||
21 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | ||
22 | + <!--@mbg.generated--> | ||
23 | + delete from dispatch_business | ||
24 | + where id = #{id,jdbcType=VARCHAR} | ||
25 | + </delete> | ||
26 | + <insert id="insert" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
27 | + <!--@mbg.generated--> | ||
28 | + insert into dispatch_business (id, dispatch_type) | ||
29 | + values (#{id,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR}) | ||
30 | + </insert> | ||
31 | + <insert id="insertSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
32 | + <!--@mbg.generated--> | ||
33 | + insert into dispatch_business | ||
34 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
35 | + <if test="id != null"> | ||
36 | + id, | ||
37 | + </if> | ||
38 | + <if test="dispatchType != null"> | ||
39 | + dispatch_type, | ||
40 | + </if> | ||
41 | + </trim> | ||
42 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
43 | + <if test="id != null"> | ||
44 | + #{id,jdbcType=VARCHAR}, | ||
45 | + </if> | ||
46 | + <if test="dispatchType != null"> | ||
47 | + #{dispatchType,jdbcType=VARCHAR}, | ||
48 | + </if> | ||
49 | + </trim> | ||
50 | + </insert> | ||
51 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
52 | + <!--@mbg.generated--> | ||
53 | + update dispatch_business | ||
54 | + <set> | ||
55 | + <if test="dispatchType != null"> | ||
56 | + dispatch_type = #{dispatchType,jdbcType=VARCHAR}, | ||
57 | + </if> | ||
58 | + </set> | ||
59 | + where id = #{id,jdbcType=VARCHAR} | ||
60 | + </update> | ||
61 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
62 | + <!--@mbg.generated--> | ||
63 | + update dispatch_business | ||
64 | + set dispatch_type = #{dispatchType,jdbcType=VARCHAR} | ||
65 | + where id = #{id,jdbcType=VARCHAR} | ||
66 | + </update> | ||
67 | + <update id="updateBatch" parameterType="java.util.List"> | ||
68 | + <!--@mbg.generated--> | ||
69 | + update dispatch_business | ||
70 | + <trim prefix="set" suffixOverrides=","> | ||
71 | + <trim prefix="dispatch_type = case" suffix="end,"> | ||
72 | + <foreach collection="list" index="index" item="item"> | ||
73 | + when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR} | ||
74 | + </foreach> | ||
75 | + </trim> | ||
76 | + </trim> | ||
77 | + where id in | ||
78 | + <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||
79 | + #{item.id,jdbcType=VARCHAR} | ||
74 | </foreach> | 80 | </foreach> |
75 | - </trim> | ||
76 | - </trim> | ||
77 | - where id in | ||
78 | - <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||
79 | - #{item.id,jdbcType=VARCHAR} | ||
80 | - </foreach> | ||
81 | - </update> | ||
82 | - <update id="updateBatchSelective" parameterType="java.util.List"> | ||
83 | - <!--@mbg.generated--> | ||
84 | - update dispatch_business | ||
85 | - <trim prefix="set" suffixOverrides=","> | ||
86 | - <trim prefix="dispatch_type = case" suffix="end,"> | ||
87 | - <foreach collection="list" index="index" item="item"> | ||
88 | - <if test="item.dispatchType != null"> | ||
89 | - when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR} | ||
90 | - </if> | 81 | + </update> |
82 | + <update id="updateBatchSelective" parameterType="java.util.List"> | ||
83 | + <!--@mbg.generated--> | ||
84 | + update dispatch_business | ||
85 | + <trim prefix="set" suffixOverrides=","> | ||
86 | + <trim prefix="dispatch_type = case" suffix="end,"> | ||
87 | + <foreach collection="list" index="index" item="item"> | ||
88 | + <if test="item.dispatchType != null"> | ||
89 | + when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR} | ||
90 | + </if> | ||
91 | + </foreach> | ||
92 | + </trim> | ||
93 | + </trim> | ||
94 | + where id in | ||
95 | + <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||
96 | + #{item.id,jdbcType=VARCHAR} | ||
91 | </foreach> | 97 | </foreach> |
92 | - </trim> | ||
93 | - </trim> | ||
94 | - where id in | ||
95 | - <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||
96 | - #{item.id,jdbcType=VARCHAR} | ||
97 | - </foreach> | ||
98 | - </update> | ||
99 | - <insert id="batchInsert" parameterType="map"> | ||
100 | - <!--@mbg.generated--> | ||
101 | - insert into dispatch_business | ||
102 | - (id, dispatch_type) | ||
103 | - values | ||
104 | - <foreach collection="list" item="item" separator=","> | ||
105 | - (#{item.id,jdbcType=VARCHAR}, #{item.dispatchType,jdbcType=VARCHAR}) | ||
106 | - </foreach> | ||
107 | - </insert> | ||
108 | - <insert id="insertOrUpdate" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
109 | - <!--@mbg.generated--> | ||
110 | - insert into dispatch_business | ||
111 | - (id, dispatch_type) | ||
112 | - values | ||
113 | - (#{id,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR}) | ||
114 | - on duplicate key update | ||
115 | - id = #{id,jdbcType=VARCHAR}, | ||
116 | - dispatch_type = #{dispatchType,jdbcType=VARCHAR} | ||
117 | - </insert> | ||
118 | - <insert id="insertOrUpdateSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
119 | - <!--@mbg.generated--> | ||
120 | - insert into dispatch_business | ||
121 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
122 | - <if test="id != null"> | ||
123 | - id, | ||
124 | - </if> | ||
125 | - <if test="dispatchType != null"> | ||
126 | - dispatch_type, | ||
127 | - </if> | ||
128 | - </trim> | ||
129 | - values | ||
130 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
131 | - <if test="id != null"> | ||
132 | - #{id,jdbcType=VARCHAR}, | ||
133 | - </if> | ||
134 | - <if test="dispatchType != null"> | ||
135 | - #{dispatchType,jdbcType=VARCHAR}, | ||
136 | - </if> | ||
137 | - </trim> | ||
138 | - on duplicate key update | ||
139 | - <trim suffixOverrides=","> | ||
140 | - <if test="id != null"> | 98 | + </update> |
99 | + <insert id="batchInsert" parameterType="map"> | ||
100 | + <!--@mbg.generated--> | ||
101 | + insert into dispatch_business | ||
102 | + (id, dispatch_type) | ||
103 | + values | ||
104 | + <foreach collection="list" item="item" separator=","> | ||
105 | + (#{item.id,jdbcType=VARCHAR}, #{item.dispatchType,jdbcType=VARCHAR}) | ||
106 | + </foreach> | ||
107 | + </insert> | ||
108 | + <insert id="insertOrUpdate" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
109 | + <!--@mbg.generated--> | ||
110 | + insert into dispatch_business | ||
111 | + (id, dispatch_type) | ||
112 | + values | ||
113 | + (#{id,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR}) | ||
114 | + on duplicate key update | ||
141 | id = #{id,jdbcType=VARCHAR}, | 115 | id = #{id,jdbcType=VARCHAR}, |
142 | - </if> | ||
143 | - <if test="dispatchType != null"> | ||
144 | - dispatch_type = #{dispatchType,jdbcType=VARCHAR}, | ||
145 | - </if> | ||
146 | - </trim> | ||
147 | - </insert> | ||
148 | -</mapper> | ||
116 | + dispatch_type = #{dispatchType,jdbcType=VARCHAR} | ||
117 | + </insert> | ||
118 | + <insert id="insertOrUpdateSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchBusiness"> | ||
119 | + <!--@mbg.generated--> | ||
120 | + insert into dispatch_business | ||
121 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
122 | + <if test="id != null"> | ||
123 | + id, | ||
124 | + </if> | ||
125 | + <if test="dispatchType != null"> | ||
126 | + dispatch_type, | ||
127 | + </if> | ||
128 | + </trim> | ||
129 | + values | ||
130 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
131 | + <if test="id != null"> | ||
132 | + #{id,jdbcType=VARCHAR}, | ||
133 | + </if> | ||
134 | + <if test="dispatchType != null"> | ||
135 | + #{dispatchType,jdbcType=VARCHAR}, | ||
136 | + </if> | ||
137 | + </trim> | ||
138 | + on duplicate key update | ||
139 | + <trim suffixOverrides=","> | ||
140 | + <if test="id != null"> | ||
141 | + id = #{id,jdbcType=VARCHAR}, | ||
142 | + </if> | ||
143 | + <if test="dispatchType != null"> | ||
144 | + dispatch_type = #{dispatchType,jdbcType=VARCHAR}, | ||
145 | + </if> | ||
146 | + </trim> | ||
147 | + </insert> | ||
148 | +</mapper> |
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | <if test="dispatchNote.endTime != null"> | 58 | <if test="dispatchNote.endTime != null"> |
59 | AND DATE_FORMAT(end_time,'%Y-%m-%d') = #{dispatchNote.endTime,jdbcType=DATE} | 59 | AND DATE_FORMAT(end_time,'%Y-%m-%d') = #{dispatchNote.endTime,jdbcType=DATE} |
60 | </if> | 60 | </if> |
61 | - order by gmt_create desc | 61 | + order by gmt_create desc |
62 | </select> | 62 | </select> |
63 | 63 | ||
64 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 64 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
@@ -466,22 +466,22 @@ | @@ -466,22 +466,22 @@ | ||
466 | <include refid="Base_Column_List"/> | 466 | <include refid="Base_Column_List"/> |
467 | from driver_info | 467 | from driver_info |
468 | <where> | 468 | <where> |
469 | - <!-- 驾驶员,姓名 --> | ||
470 | - <if test="driverName != null and driverName != ''"> | ||
471 | - driver_name = #{driverName,jdbcType=VARCHAR} | ||
472 | - </if> | ||
473 | - <!-- 驾驶员,联系方式 --> | ||
474 | - <if test="driverMobile != null and driverMobile != ''"> | ||
475 | - AND driver_mobile = #{driverMobile,jdbcType=VARCHAR} | ||
476 | - </if> | ||
477 | - <!-- 驾驶员,所属公司 --> | ||
478 | - <if test="driverCompany != null and driverCompany != ''"> | ||
479 | - AND driver_company = #{driverCompany,jdbcType=VARCHAR} | ||
480 | - </if> | ||
481 | - <!-- 驾驶员,状态 --> | ||
482 | - <if test="driverStatus != null and driverStatus != ''"> | ||
483 | - AND driver_status = #{driverStatus,jdbcType=VARCHAR} | ||
484 | - </if> | 469 | + <!-- 驾驶员,姓名 --> |
470 | + <if test="driverName != null and driverName != ''"> | ||
471 | + driver_name = #{driverName,jdbcType=VARCHAR} | ||
472 | + </if> | ||
473 | + <!-- 驾驶员,联系方式 --> | ||
474 | + <if test="driverMobile != null and driverMobile != ''"> | ||
475 | + AND driver_mobile = #{driverMobile,jdbcType=VARCHAR} | ||
476 | + </if> | ||
477 | + <!-- 驾驶员,所属公司 --> | ||
478 | + <if test="driverCompany != null and driverCompany != ''"> | ||
479 | + AND driver_company = #{driverCompany,jdbcType=VARCHAR} | ||
480 | + </if> | ||
481 | + <!-- 驾驶员,状态 --> | ||
482 | + <if test="driverStatus != null and driverStatus != ''"> | ||
483 | + AND driver_status = #{driverStatus,jdbcType=VARCHAR} | ||
484 | + </if> | ||
485 | </where> | 485 | </where> |
486 | </select> | 486 | </select> |
487 | </mapper> | 487 | </mapper> |
@@ -567,22 +567,22 @@ | @@ -567,22 +567,22 @@ | ||
567 | <include refid="Base_Column_List"/> | 567 | <include refid="Base_Column_List"/> |
568 | from vehicle_info | 568 | from vehicle_info |
569 | <where> | 569 | <where> |
570 | - <!-- 车牌号 --> | ||
571 | - <if test="licensePlateNumber != null and licensePlateNumber !=''"> | ||
572 | - license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR} | ||
573 | - </if> | ||
574 | - <!-- 车辆类型 --> | ||
575 | - <if test="vehicleType != null and vehicleType != ''"> | ||
576 | - AND vehicle_type = #{vehicleType,jdbcType=VARCHAR} | ||
577 | - </if> | ||
578 | - <!-- 车辆状态 --> | ||
579 | - <if test="vehicleStatus != null and vehicleStatus != ''"> | ||
580 | - AND vehicle_status = #{vehicleStatus,jdbcType=VARCHAR} | ||
581 | - </if> | ||
582 | - <!-- 所属公司 --> | ||
583 | - <if test="vehicleCompany != null and vehicleCompany != ''"> | ||
584 | - AND vehicle_company = #{vehicleCompany,jdbcType=VARCHAR} | ||
585 | - </if> | 570 | + <!-- 车牌号 --> |
571 | + <if test="licensePlateNumber != null and licensePlateNumber !=''"> | ||
572 | + license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR} | ||
573 | + </if> | ||
574 | + <!-- 车辆类型 --> | ||
575 | + <if test="vehicleType != null and vehicleType != ''"> | ||
576 | + AND vehicle_type = #{vehicleType,jdbcType=VARCHAR} | ||
577 | + </if> | ||
578 | + <!-- 车辆状态 --> | ||
579 | + <if test="vehicleStatus != null and vehicleStatus != ''"> | ||
580 | + AND vehicle_status = #{vehicleStatus,jdbcType=VARCHAR} | ||
581 | + </if> | ||
582 | + <!-- 所属公司 --> | ||
583 | + <if test="vehicleCompany != null and vehicleCompany != ''"> | ||
584 | + AND vehicle_company = #{vehicleCompany,jdbcType=VARCHAR} | ||
585 | + </if> | ||
586 | </where> | 586 | </where> |
587 | order by freetime | 587 | order by freetime |
588 | </select> | 588 | </select> |
-
请 注册 或 登录 后发表评论