Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", |
| | | "dev": true |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "ssri": { |
| | | "version": "8.0.1", |
| | | "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826515595&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "minipass": "^3.1.1" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | |
| | | "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", |
| | | "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", |
| | | "dev": true |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | parentId: null, |
| | | disable: false, |
| | | parentName: '', |
| | | parentType:0 |
| | | parentType:null |
| | | } |
| | | if (target != null) { |
| | | this.form.parentId = target.id |
| | |
| | | <template> |
| | | <div class="box"> |
| | | <el-form :model="form" ref="form" label-width="140px"> |
| | | <div><span style="font-size: 15px;font-weight: bold">äººåææé
ç½®ï¼</span></div> |
| | | <el-form-item label="" prop="frezzDays" label-width="50px"> |
| | | 人åé¨ç¦ææå»ç»ï¼è¿ç» |
| | | <el-input style="width: 50px;" type="text" v-model="form.frezzDays" placeholder="" v-trim/> |
| | | å¤©ï¼æ é¨ç¦/车è¾é¸æºäºä»¶ |
| | | </el-form-item> |
| | | <div><span style="font-size: 15px;font-weight: bold">访客é
ç½®ï¼</span></div> |
| | | <el-form-item label="æ¥è®¿é¢çº¦æ¹å¼:" prop="reservationWay"> |
| | | <el-radio-group v-model="form.reservationWay"> |
| | | <el-radio :label="0">é¢çº¦å
ç»è®°</el-radio> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="å
¥åé¡»ç¥:" prop="visitNotice"> |
| | | <el-tiptap style="width: 50%;" v-model="form.visitNotice" :extensions="extensions" /> |
| | | </el-form-item> |
| | | <el-form-item label="访客é¢çº¦æå:" prop="visitNotice"> |
| | | <el-tiptap style="width: 50%;" v-model="form.visitTips" :extensions="extensions" /> |
| | | </el-form-item> |
| | | <el-form-item label="访客å
¥å导è§å¾:" prop="visitNotice"> |
| | | <el-tiptap style="width: 50%;" v-model="form.visitMap" :extensions="extensions" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submit">ä¿åé
置项</el-button> |
| | |
| | | doorsVisitRequired: '', |
| | | theme: '', |
| | | description: '', |
| | | visitNotice: '' |
| | | visitNotice: '', |
| | | visitMap: '', |
| | | visitTips: '', |
| | | frezzDays: null |
| | | }, |
| | | extensions: [ |
| | | new Doc(), |
| | |
| | | this.form.theme = res.theme |
| | | this.form.doorsVisitRequired = res.doorsVisitRequired |
| | | this.form.visitNotice = res.visitNotice |
| | | this.form.visitTips = res.visitTips |
| | | this.form.visitMap = res.visitMap |
| | | this.form.frezzDays = res.frezzDays |
| | | }) |
| | | }, |
| | | submit () { |
| | |
| | | description: this.form.description, |
| | | theme: this.form.theme, |
| | | visitNotice: this.form.visitNotice, |
| | | visitTips: this.form.visitTips, |
| | | frezzDays: this.form.frezzDays, |
| | | visitMap: this.form.visitMap, |
| | | doorsVisitRequired: this.form.doorsVisitRequired |
| | | }).then(res => { |
| | | this.$message.success('ä¿åæå') |
| | |
| | | |
| | | import com.doumee.core.utils.Constants; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | import javax.servlet.Filter; |
| | | |
| | | @Configuration |
| | | public class CloudWebConfig implements WebMvcConfigurer { |
| | |
| | | registry.addInterceptor(new LoginHandlerInterceptor(stringRedisTemplate)) |
| | | .addPathPatterns(Constants.CLOUD_SERVICE_URL_INDEX+"/**"); |
| | | } |
| | | |
| | | // @Bean |
| | | public FilterRegistrationBean addRequestWrapperFilter() { |
| | | FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>(); |
| | | registration.setFilter(new RequestWrapperFilter()); |
| | | registration.setName("RequestWrapperFilter"); |
| | | registration.addUrlPatterns(Constants.CLOUD_SERVICE_URL_INDEX+"/*"); |
| | | registration.setOrder(1); |
| | | return registration; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config.cloudfilter; |
| | | |
| | | import javax.servlet.ReadListener; |
| | | import javax.servlet.ServletInputStream; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletRequestWrapper; |
| | | import java.io.BufferedReader; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | public class CustomHttpServletRequestWrapper extends HttpServletRequestWrapper { |
| | | private String body; |
| | | public CustomHttpServletRequestWrapper(HttpServletRequest request ) { |
| | | super(request); |
| | | this.body = body; |
| | | } |
| | | |
| | | @Override |
| | | public ServletInputStream getInputStream() throws IOException { |
| | | final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8)); |
| | | ServletInputStream servletInputStream = new ServletInputStream() { |
| | | @Override |
| | | public boolean isFinished() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isReady() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public void setReadListener(ReadListener readListener) { |
| | | } |
| | | |
| | | @Override |
| | | public int read() throws IOException { |
| | | return byteArrayInputStream.read(); |
| | | } |
| | | }; |
| | | return servletInputStream; |
| | | } |
| | | |
| | | @Override |
| | | public BufferedReader getReader() throws IOException { |
| | | return new BufferedReader(new InputStreamReader(this.getInputStream())); |
| | | } |
| | | |
| | | public String getBody() { |
| | | return body; |
| | | } |
| | | |
| | | public void setBody(String body) { |
| | | this.body = body; |
| | | } |
| | | } |
| | |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | import org.springframework.web.util.ContentCachingRequestWrapper; |
| | | |
| | | import javax.servlet.ServletInputStream; |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletRequestWrapper; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Enumeration; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.util.*; |
| | | |
| | | public class LoginHandlerInterceptor implements HandlerInterceptor { |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | /*try { |
| | | CustomHttpServletRequestWrapper requestWrapper = (CustomHttpServletRequestWrapper)request; |
| | | String body = requestWrapper.getBody(); |
| | | JSONObject object = JSONObject.parseObject(body); |
| | | if(object!=null){ |
| | | object.put("loginUserinfo",user); |
| | | requestWrapper.setBody( JSONObject.toJSONString(object)); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }*/ |
| | | } else { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"æªç»å½"); |
| | | } |
| | |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private String getRequestBody(HttpServletRequest request) { |
| | | // å®ç°ä»requestè·å请æ±ä½çé»è¾ |
| | | String body = null; |
| | | ServletInputStream inputStream = null; |
| | | try { |
| | | inputStream = request.getInputStream(); |
| | | String charset = request.getCharacterEncoding(); // å¯è½ä¸ºnull |
| | | if (charset == null) { |
| | | charset = "UTF-8"; // é»è®¤ç¼ç |
| | | } |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, charset)); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | String line = null; |
| | | while ((line = reader.readLine()) != null) { |
| | | stringBuilder.append(line + "\n"); |
| | | } |
| | | body = stringBuilder.toString(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | return body; |
| | | } |
| | | |
| | | private LoginUserInfo checkLogin(String token) { |
| | |
| | | return user; |
| | | } |
| | | |
| | | |
| | | |
| | | // @Override |
| | | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { |
| | | // UserContext.removeUser(); |
| | | } |
| | | |
| | | class RSARequestWrapper extends HttpServletRequestWrapper { |
| | | private Map<String, String[]> params = new HashMap<>(); |
| | | /** |
| | | * å¿
é¡»è¦å®ç°çæé æ¹æ³ |
| | | * @param request |
| | | */ |
| | | public RSARequestWrapper(HttpServletRequest request) { |
| | | super(request); |
| | | //å°åæ°è¡¨ï¼èµäºç»å½åçMapä»¥ä¾¿äºæærequestä¸çåæ° |
| | | this.params.putAll(request.getParameterMap()); |
| | | } |
| | | /** |
| | | * éè½½æé æ¹æ³ |
| | | * @param request |
| | | * @param extendParams |
| | | */ |
| | | public RSARequestWrapper(HttpServletRequest request, Map<String, Object> extendParams) { |
| | | this(request); |
| | | //è¿éå°æ©å±åæ°åå
¥åæ°è¡¨ |
| | | addAllParameters(extendParams); |
| | | } |
| | | /** |
| | | * å¨è·åææçåæ°å,å¿
é¡»éåæ¤æ¹æ³ï¼å¦å对象ä¸åæ°å¼æ å°ä¸ä¸ |
| | | * @return |
| | | */ |
| | | @SuppressWarnings({ "unchecked", "rawtypes" }) |
| | | @Override |
| | | public Enumeration<String> getParameterNames() { |
| | | return new Vector(params.keySet()).elements(); |
| | | } |
| | | /** |
| | | * å¢å å¤ä¸ªåæ° |
| | | * @param otherParams å¢å çå¤ä¸ªåæ° |
| | | */ |
| | | public void addAllParameters(Map<String, Object> otherParams) { |
| | | for (Map.Entry<String, Object> entry : otherParams.entrySet()) { |
| | | addParameter(entry.getKey(), entry.getValue()); |
| | | } |
| | | } |
| | | /** |
| | | * å¢å åæ° |
| | | * getParameterMap()ä¸çç±»åæ¯<String,String[]>ç±»åçï¼æä»¥è¿éè¦å°å
¶value转为String[]ç±»å |
| | | * @param name åæ°å |
| | | * @param value åæ°å¼ |
| | | */ |
| | | public void addParameter(String name, Object value) { |
| | | if (value != null) { |
| | | if (value instanceof String[]) { |
| | | params.put(name, (String[]) value); |
| | | } else if (value instanceof String) { |
| | | params.put(name, new String[]{(String) value}); |
| | | } else { |
| | | params.put(name, new String[]{String.valueOf(value)}); |
| | | } |
| | | } |
| | | } |
| | | @Override |
| | | public String[] getParameterValues(String name) { |
| | | String[] access_token_user_id = params.get("access_token_user_id"); |
| | | String[] values = params.get(name);//getValue(name); |
| | | if (values == null || access_token_user_id==null){ |
| | | return null; |
| | | } |
| | | return values; |
| | | } |
| | | |
| | | @Override |
| | | public String getParameter(String name) { |
| | | String[] access_token_user_id = params.get("access_token_user_id"); |
| | | String[] values = params.get(name);//getValue(name); |
| | | if (values == null || access_token_user_id==null){ |
| | | return null; |
| | | } |
| | | return values[0]; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config.cloudfilter; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.servlet.*; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | @Slf4j |
| | | public class RequestWrapperFilter implements Filter { |
| | | |
| | | @Override |
| | | public void init(FilterConfig config) { |
| | | log.info("==>RequestWrapperFilterå¯å¨"); |
| | | } |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) |
| | | throws java.io.IOException, ServletException { |
| | | CustomHttpServletRequestWrapper requestWrapper = new CustomHttpServletRequestWrapper((HttpServletRequest) request); |
| | | chain.doFilter(requestWrapper, response); |
| | | } |
| | | |
| | | @Override |
| | | public void destroy() { |
| | | } |
| | | } |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:cardriver:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | carDriverService.deleteById(id); |
| | | carDriverService.deleteById(id,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:cardriver:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | carDriverService.deleteByIdInBatch(this.getIdList(ids)); |
| | | carDriverService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:cardriver:create") |
| | | public ApiResponse create(@RequestBody CarDriver carDriver,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carDriver.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(carDriverService.create(carDriver)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:cardriver:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carDriverService.deleteById(id); |
| | | carDriverService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:cardriver:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carDriverService.deleteByIdInBatch(this.getIdList(ids)); |
| | | carDriverService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:cardriver:update") |
| | | public ApiResponse updateById(@RequestBody CarDriver carDriver,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carDriver.setLoginUserInfo(this.getLoginUser(token)); |
| | | carDriverService.updateById(carDriver); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.CarDriver; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2024/04/28 16:06 |
| | | */ |
| | | public interface CarDriverMapper extends BaseMapper<CarDriver> { |
| | | public interface CarDriverMapper extends MPJBaseMapper<CarDriver> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.CarUseBook; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2024/04/28 16:06 |
| | | */ |
| | | public interface CarUseBookMapper extends BaseMapper<CarUseBook> { |
| | | public interface CarUseBookMapper extends MPJBaseMapper<CarUseBook> { |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("审æ¹ä¿¡æ¯è®°å½è¡¨") |
| | | @TableName("`approve`") |
| | | public class Approve { |
| | | public class Approve extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å®¡æ¹æ¨¡çé
置信æ¯è¡¨") |
| | | @TableName("`approve_param`") |
| | | public class ApproveParam { |
| | | public class ApproveParam extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å®¡æ¹æ¨¡çä¿¡æ¯è¡¨") |
| | | @TableName("`approve_templ`") |
| | | public class ApproveTempl { |
| | | public class ApproveTempl extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("叿ºä¿¡æ¯è¡¨") |
| | | @TableName("`car_driver`") |
| | | public class CarDriver { |
| | | public class CarDriver extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private String creator; |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private String edirot; |
| | | private Integer edirot; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | |
| | | @ExcelColumn(name="人åç¼ç ï¼å
³èmember表)") |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "叿ºå§å", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | @ApiModelProperty(value = "叿ºç»ç»åç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "叿ºææºå·", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberPhone; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å车åºäºä»¶æ¨éè®°å½è¡¨") |
| | | @TableName("`car_event`") |
| | | public class CarEvent { |
| | | public class CarEvent extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å车åºä¿¡æ¯è¡¨") |
| | | @TableName("`car_parks`") |
| | | public class CarParks { |
| | | public class CarParks extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车è¾_ç¨è½¦ç³è¯·ä¿¡æ¯è¡¨ |
| | |
| | | @Data |
| | | @ApiModel("车è¾_ç¨è½¦ç³è¯·ä¿¡æ¯è¡¨") |
| | | @TableName("`car_use_book`") |
| | | public class CarUseBook { |
| | | public class CarUseBook extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @ExcelColumn(name="å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @ExcelColumn(name="ç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡åºåæ¶é´") |
| | |
| | | |
| | | @ApiModelProperty(value = "ä¹è½¦äººç¼ç éåï¼å¤ä¸ªè±æéå·éå¼", example = "1") |
| | | @ExcelColumn(name="ä¹è½¦äººç¼ç éåï¼å¤ä¸ªè±æéå·éå¼") |
| | | private Integer memberIds; |
| | | private String memberIds; |
| | | |
| | | @ApiModelProperty(value = "ä¹è½¦äººå§åéåï¼å¤ä¸ªè±æéå·éå¼") |
| | | @ExcelColumn(name="ä¹è½¦äººå§åéåï¼å¤ä¸ªè±æéå·éå¼") |
| | |
| | | @ExcelColumn(name="叿ºç¼ç ï¼å
³ècar_driverï¼") |
| | | private Integer driverId; |
| | | |
| | | @ApiModelProperty(value = "ç¨è½¦äººå", example = "1") |
| | | @ExcelColumn(name="ç¨è½¦äººå") |
| | | private Integer memberNum; |
| | | |
| | | @ApiModelProperty(value = "叿ºå§å", example = "1") |
| | | @TableField(exist = false) |
| | | private String driverName; |
| | | @ApiModelProperty(value = "叿ºææºå·", example = "1") |
| | | @TableField(exist = false) |
| | | private String driverPhone; |
| | | @ApiModelProperty(value = "ç³è¯·äººå§å", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | @ApiModelProperty(value = "ç³è¯·äººæå±ç»ç»åç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "ç³è¯·äººææºå·", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberPhone; |
| | | @ApiModelProperty(value = "ä¹è½¦äººéå", example = "1") |
| | | @TableField(exist = false) |
| | | private List<Member> memberList; |
| | | @ApiModelProperty(value = "æ¥è¯¢å¼å§æ¶é´ï¼åºäºå建æ¶é´ï¼", example = "2024-05-20 11:48:50") |
| | | @TableField(exist = false) |
| | | private Date queryStartTime; |
| | | @ApiModelProperty(value = "æ¥è¯¢æªæ¢å§æ¶é´ï¼åºäºå建æ¶é´ï¼", example = "2024-05-20 11:48:46") |
| | | @TableField(exist = false) |
| | | private Date queryEndTime; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("车è¾ä¿¡æ¯è¡¨") |
| | | @TableName("`cars`") |
| | | public class Cars { |
| | | public class Cars extends LoginUserModel { |
| | | |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("设å¤ä¿¡æ¯è¡¨") |
| | | @TableName("`device`") |
| | | public class Device { |
| | | public class Device extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("é¨ç¦äºä»¶æ¨éè®°å½è¡¨") |
| | | @TableName("`device_event`") |
| | | public class DeviceEvent { |
| | | public class DeviceEvent extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("äººåææå¯¼å
¥è®°å½") |
| | | @TableName("`empower`") |
| | | public class Empower { |
| | | public class Empower extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("表åé
置信æ¯è¡¨") |
| | | @TableName("`form_param`") |
| | | public class FormParam { |
| | | public class FormParam extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("éæ£ä¿¡æ¯è¡¨") |
| | | @TableName("`hidden_danger`") |
| | | public class HiddenDanger { |
| | | public class HiddenDanger extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("çè³ æä½åå²è¡¨") |
| | | @TableName("`hidden_danger_log`") |
| | | public class HiddenDangerLog { |
| | | public class HiddenDangerLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("鿣åºåé
置类åä¿¡æ¯è¡¨") |
| | | @TableName("`hidden_danger_param`") |
| | | public class HiddenDangerParam { |
| | | public class HiddenDangerParam extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("䏿¹å¹³å°æ¥å£äº¤äºè®°å½") |
| | | @TableName("`interface_log`") |
| | | public class InterfaceLog { |
| | | public class InterfaceLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("车è¾é¢çº¦è®°å½ä¿¡æ¯è¡¨") |
| | | @TableName("`park_book`") |
| | | public class ParkBook { |
| | | public class ParkBook extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å车åºä¿¡æ¯è¡¨") |
| | | @TableName("`parks`") |
| | | public class Parks { |
| | | public class Parks extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°ä¿¡æ¯è¡¨") |
| | | @TableName("`platform`") |
| | | public class Platform { |
| | | public class Platform extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°_åç»ä¿¡æ¯è¡¨") |
| | | @TableName("`platform_group`") |
| | | public class PlatformGroup { |
| | | public class PlatformGroup extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("ä½ä¸è°åº¦å¹³å°æ¥å£äº¤äºè®°å½") |
| | | @TableName("`platform_interface_log`") |
| | | public class PlatformInterfaceLog { |
| | | public class PlatformInterfaceLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°è°åº¦ä½ä¸ä¿¡æ¯è¡¨") |
| | | @TableName("`platform_job`") |
| | | public class PlatformJob { |
| | | public class PlatformJob extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°_ä½ä¸æä½åå²è¡¨") |
| | | @TableName("`platform_log`") |
| | | public class PlatformLog { |
| | | public class PlatformLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°_å«å·æéä¿¡æ¯è¡¨") |
| | | @TableName("`platform_queue`") |
| | | public class PlatformQueue { |
| | | public class PlatformQueue extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°_æ¾ç¤ºé
置信æ¯è¡¨") |
| | | @TableName("`platform_show_param`") |
| | | public class PlatformShowParam { |
| | | public class PlatformShowParam extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.config.mybatis.JSONObjectHandler; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客çé¢è®°å½è¡¨") |
| | | @TableName(value = "`problem_log`",autoResultMap = true) |
| | | public class ProblemLog { |
| | | public class ProblemLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.dao.admin.request.OptionsObject; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @Data |
| | | @ApiModel("è¯é¢ä¿¡æ¯è¡¨") |
| | | @TableName("`problems`") |
| | | public class Problems { |
| | | public class Problems extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å¨å人åä¿¡æ¯ è¡¨ï¼æ»çï¼") |
| | | @TableName("`retention`") |
| | | public class Retention { |
| | | public class Retention extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("å®é²ä¸åå¹³å°ä»»å¡ä¿¡æ¯è¡¨") |
| | | @TableName("`tasks`") |
| | | public class Tasks { |
| | | public class Tasks extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("人åå¹è®æææè®°å½") |
| | | @TableName("`train_time`") |
| | | public class TrainTime { |
| | | public class TrainTime extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("人åæä½è®°å½æ¥å¿") |
| | | @TableName("`user_action`") |
| | | public class UserAction { |
| | | public class UserAction extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客äºä»¶æ¨éè®°å½è¡¨") |
| | | @TableName("`visit_event`") |
| | | public class VisitEvent { |
| | | public class VisitEvent extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客æ¥å¤å车åºå
³è表") |
| | | @TableName("`visit_park`") |
| | | public class VisitPark { |
| | | public class VisitPark extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客çé¢è®°å½è¡¨") |
| | | @TableName("`visit_problem_log`") |
| | | public class VisitProblemLog { |
| | | public class VisitProblemLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("è¯é¢ä¿¡æ¯è¡¨") |
| | | @TableName("`visit_problems`") |
| | | public class VisitProblems { |
| | | public class VisitProblems extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客信æ¯è¡¨") |
| | | @TableName("`visitor`") |
| | | public class Visitor { |
| | | public class Visitor extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("访客ç³è¯·ä¿¡æ¯è¡¨") |
| | | @TableName("`visits`") |
| | | public class Visits { |
| | | public class Visits extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.CarDriver; |
| | |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | |
| | | /** |
| | | * å é¤ |
| | |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CarDriverMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.model.CarDriver; |
| | | import com.doumee.dao.business.model.CarUseBook; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.CarDriverService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.java.Log; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.smartcardio.Card; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Override |
| | | public Integer create(CarDriver carDriver) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = carDriver.getLoginUserInfo(); |
| | | } |
| | | Member member = memberMapper.selectById(carDriver.getMemberId()); |
| | | if(member == null |
| | | ||Constants.equalsInteger(member.getIsdeleted(),Constants.ONE) |
| | | ||!Constants.equalsInteger(member.getType(),Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"è¯¥å¸æºä¿¡æ¯ä¸åå¨ï¼è¯·è¿åå·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if(carDriverMapper.selectCount(new QueryWrapper<CarDriver>().lambda() |
| | | .eq(CarDriver::getMemberId,carDriver.getMemberId()) |
| | | .eq(CarDriver::getIsdeleted, Constants.ZERO))>0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"è¯¥å¸æºå·²ç»é
ç½®ï¼æ ééæ°é
ç½®ï¼"); |
| | | } |
| | | carDriver.setCreateDate(new Date()); |
| | | carDriver.setCreator(loginUserInfo.getId()); |
| | | carDriver.setEditDate(new Date()); |
| | | carDriver.setEdirot(loginUserInfo.getId()); |
| | | carDriver.setCompanyId(member.getCompanyId()); |
| | | carDriver.setStatus(Constants.ZERO); |
| | | carDriverMapper.insert(carDriver); |
| | | return carDriver.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | carDriverMapper.deleteById(id); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void updateById(CarDriver carDriver) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = carDriver.getLoginUserInfo(); |
| | | } |
| | | carDriver.setEditDate(new Date()); |
| | | carDriver.setEdirot(loginUserInfo.getId()); |
| | | carDriverMapper.updateById(carDriver); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public CarDriver findById(Integer id) { |
| | | return carDriverMapper.selectById(id); |
| | | MPJLambdaWrapper<CarDriver> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(CarDriver.class); |
| | | queryWrapper.selectAs(Member::getName,CarDriver::getMemberName); |
| | | queryWrapper.selectAs(Member::getPhone,CarDriver::getMemberPhone); |
| | | queryWrapper.selectAs(Company::getCompanyNamePath,CarDriver::getCompanyName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(CarDriver::getId,id) |
| | | .last("limit 1"); |
| | | return carDriverMapper.selectJoinOne(CarDriver.class,queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public PageData<CarDriver> findPage(PageWrap<CarDriver> pageWrap) { |
| | | IPage<CarDriver> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<CarDriver> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<CarDriver> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | queryWrapper.selectAll(CarDriver.class); |
| | | queryWrapper.selectAs(Member::getName,CarDriver::getMemberName); |
| | | queryWrapper.selectAs(Member::getPhone,CarDriver::getMemberPhone); |
| | | queryWrapper.selectAs(Company::getCompanyNamePath,CarDriver::getCompanyName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper |
| | | .eq(pageWrap.getModel().getId() != null, CarDriver::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, CarDriver::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, CarDriver::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
| | |
| | | .eq(pageWrap.getModel().getCompanyId() != null, CarDriver::getCompanyId, pageWrap.getModel().getCompanyId()) |
| | | .eq(pageWrap.getModel().getStatus() != null, CarDriver::getStatus, pageWrap.getModel().getStatus()) |
| | | .eq(pageWrap.getModel().getMemberId() != null, CarDriver::getMemberId, pageWrap.getModel().getMemberId()) |
| | | .orderByDesc(CarDriver::getCreateDate ); |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(carDriverMapper.selectPage(page, queryWrapper)); |
| | | return PageData.from(carDriverMapper.selectJoinPage(page,CarDriver.class, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CarUseBookMapper; |
| | | import com.doumee.dao.business.model.CarUseBook; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.CarUseBookService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 车è¾_ç¨è½¦ç³è¯·ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | |
| | | @Override |
| | | public CarUseBook findById(Integer id) { |
| | | return carUseBookMapper.selectById(id); |
| | | MPJLambdaWrapper<CarUseBook> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(CarUseBook.class); |
| | | queryWrapper.select("t1.name",CarUseBook::getMemberName); |
| | | queryWrapper.select("t1.phone",CarUseBook::getMemberPhone); |
| | | queryWrapper.select("t2.name",CarUseBook::getDriverName); |
| | | queryWrapper.select("t3.phone",CarUseBook::getDriverPhone); |
| | | queryWrapper.select("t4.company_name_path",CarUseBook::getCompanyName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getDriverId) |
| | | .eq(CarUseBook::getId,id) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | return model; |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public PageData<CarUseBook> findPage(PageWrap<CarUseBook> pageWrap) { |
| | | IPage<CarUseBook> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<CarUseBook> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<CarUseBook> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper.selectAll(CarUseBook.class); |
| | | queryWrapper.select("t1.name",CarUseBook::getMemberName); |
| | | queryWrapper.select("t1.phone",CarUseBook::getMemberPhone); |
| | | queryWrapper.select("t2.name",CarUseBook::getDriverName); |
| | | queryWrapper.select("t3.phone",CarUseBook::getDriverPhone); |
| | | queryWrapper.select("t4.company_name_path",CarUseBook::getCompanyName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getDriverId); |
| | | queryWrapper |
| | | .eq(pageWrap.getModel().getId() != null, CarUseBook::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, CarUseBook::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, CarUseBook::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
| | |
| | | .le(pageWrap.getModel().getEditDate() != null, CarUseBook::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())) |
| | | .eq(pageWrap.getModel().getIsdeleted() != null, CarUseBook::getIsdeleted, pageWrap.getModel().getIsdeleted()) |
| | | .eq(pageWrap.getModel().getRemark() != null, CarUseBook::getRemark, pageWrap.getModel().getRemark()) |
| | | .eq(pageWrap.getModel().getCarCode() != null, CarUseBook::getCarCode, pageWrap.getModel().getCarCode()) |
| | | .like(pageWrap.getModel().getCarCode() != null, CarUseBook::getCarCode, pageWrap.getModel().getCarCode()) |
| | | .eq(pageWrap.getModel().getCarId() != null, CarUseBook::getCarId, pageWrap.getModel().getCarId()) |
| | | .ge(pageWrap.getModel().getStartTime() != null, CarUseBook::getStartTime, Utils.Date.getStart(pageWrap.getModel().getStartTime())) |
| | | .le(pageWrap.getModel().getStartTime() != null, CarUseBook::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTime())) |
| | |
| | | .eq(pageWrap.getModel().getAddr() != null, CarUseBook::getAddr, pageWrap.getModel().getAddr()) |
| | | .eq(pageWrap.getModel().getMemberId() != null, CarUseBook::getMemberId, pageWrap.getModel().getMemberId()) |
| | | .eq(pageWrap.getModel().getDriverId() != null, CarUseBook::getDriverId, pageWrap.getModel().getDriverId()) |
| | | .eq(pageWrap.getModel().getMemberNum() != null, CarUseBook::getMemberNum, pageWrap.getModel().getMemberNum()) |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), Empower::getCreateDate,pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()),Empower::getCreateDate,pageWrap.getModel().getQueryEndTime()) |
| | | .orderByDesc(Visits::getCreateDate) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(carUseBookMapper.selectPage(page, queryWrapper)); |
| | | return PageData.from(carUseBookMapper.selectJoinPage(page, CarUseBook.class, queryWrapper)); |
| | | } |
| | | |
| | | @Override |