Browse Source

[车流][修复]:修改wx_c_user_cars为wx_c_user_car

release_toaliyun_real
Stormeye.Wu 7 years ago
parent
commit
ae9b2606df
15 changed files with 203 additions and 139 deletions
  1. +14
    -15
      mallinkAdmin/src/main/java/com/simple/controller/WxCUserCarController.java
  2. +14
    -15
      mallinkBApi/src/main/java/com/simple/controller/WxCUserCarController.java
  3. +13
    -10
      mallinkCApi/src/main/java/com/simple/controller/WxCarController.java
  4. +21
    -2
      mallinkCApi/src/main/java/com/simple/controller/WxUserGrantController.java
  5. +27
    -6
      mallinkService/src/main/java/com/simple/domain/po/WxCUserCar.java
  6. +17
    -0
      mallinkService/src/main/java/com/simple/mapper/WxCUserCarMapper.java
  7. +0
    -17
      mallinkService/src/main/java/com/simple/mapper/WxCUserCarsMapper.java
  8. +15
    -7
      mallinkService/src/main/java/com/simple/service/WxCUserCarService.java
  9. +10
    -2
      mallinkService/src/main/java/com/simple/service/WxParkService.java
  10. +59
    -0
      mallinkService/src/main/java/com/simple/service/impl/WxCUserCarServiceImpl.java
  11. +0
    -54
      mallinkService/src/main/java/com/simple/service/impl/WxCUserCarsServiceImpl.java
  12. +1
    -1
      mallinkService/src/main/java/com/simple/service/impl/WxMsgValidationcodeServiceImpl.java
  13. +7
    -0
      mallinkService/src/main/java/com/simple/service/impl/WxParkServiceImpl.java
  14. +4
    -9
      mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml
  15. +1
    -1
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

mallinkAdmin/src/main/java/com/simple/controller/WxCUserCarsController.java → mallinkAdmin/src/main/java/com/simple/controller/WxCUserCarController.java View File

@@ -2,52 +2,51 @@ package com.simple.controller;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;

import com.github.pagehelper.PageInfo;
import com.simple.common.Result;
import com.simple.common.ResultData;

import com.simple.domain.po.WxCUserCars;
import com.simple.service.WxCUserCarsService;
import com.simple.domain.po.WxCUserCar;
import com.simple.service.WxCUserCarService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("wxCUserCars")
public class WxCUserCarsController extends BaseController
public class WxCUserCarController extends BaseController
{
@Autowired
private WxCUserCarsService wxCUserCarsService;
private WxCUserCarService wxCUserCarService;

private Logger logger = Logger.getLogger(WxCUserCarsController.class);
private Logger logger = Logger.getLogger(WxCUserCarController.class);
@ApiOperation("分页列表接口")
@GetMapping("list")
@ApiImplicitParams({
@ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true),
@ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)})
public ResultData list(@ModelAttribute WxCUserCars wxCUserCars,Integer pageNum, Integer pageSize) {
if (null == wxCUserCars) wxCUserCars = new WxCUserCars();
final PageInfo<WxCUserCars> page = wxCUserCarsService.listAsPage(wxCUserCars, pageNum, pageSize);
public ResultData list(@ModelAttribute WxCUserCar wxCUserCars,Integer pageNum, Integer pageSize) {
if (null == wxCUserCars) wxCUserCars = new WxCUserCar();
final PageInfo<WxCUserCar> page = wxCUserCarService.listAsPage(wxCUserCars, pageNum, pageSize);
return new ResultData(page);
}

@ApiOperation("新增接口")
@PostMapping("add")
public ResultData add(@RequestBody WxCUserCars wxCUserCars) {
public ResultData add(@RequestBody WxCUserCar wxCUserCar) {
//Assert.notNull(wxCUserCars.getName(), "角色名不能为空");
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名");
wxCUserCarsService.saveOrUpdate(wxCUserCars);
wxCUserCarService.saveOrUpdate(wxCUserCar);
return new ResultData();
}

@ApiOperation("根据id更新接口")
@PostMapping("update")
public ResultData update(@RequestBody WxCUserCars wxCUserCars) {
wxCUserCarsService.saveOrUpdate(wxCUserCars);
public ResultData update(@RequestBody WxCUserCar wxCUserCars) {
wxCUserCarService.saveOrUpdate(wxCUserCars);
return new ResultData();
}

@@ -55,7 +54,7 @@ public class WxCUserCarsController extends BaseController
@GetMapping("/del")
@ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true)
public ResultData delete(Long id) {
wxCUserCarsService.deleteById(id);
wxCUserCarService.deleteById(id);
return new ResultData(Result.SUCCESS, "删除成功", null);
}
@@ -63,7 +62,7 @@ public class WxCUserCarsController extends BaseController
@GetMapping("/findById")
@ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true)
public ResultData findById(Long id) {
return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarsService.getById(id));
return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarService.getById(id));
}

mallinkBApi/src/main/java/com/simple/controller/WxCUserCarsController.java → mallinkBApi/src/main/java/com/simple/controller/WxCUserCarController.java View File

@@ -2,52 +2,51 @@ package com.simple.controller;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;

import com.github.pagehelper.PageInfo;
import com.simple.common.Result;
import com.simple.common.ResultData;

import com.simple.domain.po.WxCUserCars;
import com.simple.service.WxCUserCarsService;
import com.simple.domain.po.WxCUserCar;
import com.simple.service.WxCUserCarService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("wxCUserCars")
public class WxCUserCarsController extends BaseController
public class WxCUserCarController extends BaseController
{
@Autowired
private WxCUserCarsService wxCUserCarsService;
private WxCUserCarService wxCUserCarService;

private Logger logger = Logger.getLogger(WxCUserCarsController.class);
private Logger logger = Logger.getLogger(WxCUserCarController.class);
@ApiOperation("分页列表接口")
@GetMapping("list")
@ApiImplicitParams({
@ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true),
@ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)})
public ResultData list(@ModelAttribute WxCUserCars wxCUserCars,Integer pageNum, Integer pageSize) {
if (null == wxCUserCars) wxCUserCars = new WxCUserCars();
final PageInfo<WxCUserCars> page = wxCUserCarsService.listAsPage(wxCUserCars, pageNum, pageSize);
public ResultData list(@ModelAttribute WxCUserCar wxCUserCars,Integer pageNum, Integer pageSize) {
if (null == wxCUserCars) wxCUserCars = new WxCUserCar();
final PageInfo<WxCUserCar> page = wxCUserCarService.listAsPage(wxCUserCars, pageNum, pageSize);
return new ResultData(page);
}

@ApiOperation("新增接口")
@PostMapping("add")
public ResultData add(@RequestBody WxCUserCars wxCUserCars) {
public ResultData add(@RequestBody WxCUserCar wxCUserCars) {
//Assert.notNull(wxCUserCars.getName(), "角色名不能为空");
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名");
wxCUserCarsService.saveOrUpdate(wxCUserCars);
wxCUserCarService.saveOrUpdate(wxCUserCars);
return new ResultData();
}

@ApiOperation("根据id更新接口")
@PostMapping("update")
public ResultData update(@RequestBody WxCUserCars wxCUserCars) {
wxCUserCarsService.saveOrUpdate(wxCUserCars);
public ResultData update(@RequestBody WxCUserCar wxCUserCar) {
wxCUserCarService.saveOrUpdate(wxCUserCar);
return new ResultData();
}

@@ -55,7 +54,7 @@ public class WxCUserCarsController extends BaseController
@GetMapping("/del")
@ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true)
public ResultData delete(Long id) {
wxCUserCarsService.deleteById(id);
wxCUserCarService.deleteById(id);
return new ResultData(Result.SUCCESS, "删除成功", null);
}
@@ -63,7 +62,7 @@ public class WxCUserCarsController extends BaseController
@GetMapping("/findById")
@ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true)
public ResultData findById(Long id) {
return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarsService.getById(id));
return new ResultData(Result.SUCCESS,"查询成功",wxCUserCarService.getById(id));
}

+ 13
- 10
mallinkCApi/src/main/java/com/simple/controller/WxCarController.java View File

@@ -3,13 +3,15 @@ package com.simple.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.simple.common.ErrorCode;
import com.simple.common.Result;
import com.simple.common.ResultData;
import com.simple.domain.po.WxCUser;
import com.simple.domain.po.WxCUserCar;
import com.simple.domain.po.WxCarCmdLogs;
import com.simple.domain.po.WxPark;
import com.simple.enums.EnumCarVendor;
import com.simple.service.WxCUserCarService;
import com.simple.service.WxCarCmdLogsService;
import com.simple.service.WxParkService;
import com.simple.utils.ETCPUtil;
@@ -38,17 +40,15 @@ public class WxCarController extends BaseController
@Autowired
WxParkService wxParkService;


@Autowired
WxCUserCarService wxCUserCarService;

private WxPark getCurrentPark() {
WxCUser user = getUser();
WxPark wxPark = wxParkService.getByTenantId(user.getTenantId());
// 1, get mall's park
// future use redis to optimize
final PageInfo<WxPark> wxParkList = wxParkService.listAsPage(new WxPark(), 1, 1);
if (wxParkList.getSize() <= 0) {
return null;
}
WxPark park = wxParkList.getList().get(0);
return park;
return wxPark;
}

@ApiOperation(value = "获取车场支持的厂家",notes="")
@@ -75,6 +75,7 @@ public class WxCarController extends BaseController
if (park.getVendorType() == EnumCarVendor.CAR_ETCP.getCode()) {
String phone = paramMap.get("phone");
if (StringUtils.isBlank(phone)) {
logger.error("手机号为空");
return new ResultData(ErrorCode.PARAMETER_NOT_NULL.getCode(), "phone为空");
}
String params = park.getVendorParams();
@@ -91,7 +92,6 @@ public class WxCarController extends BaseController
// 获取绑定的车牌
JSONObject dataObj = retObj.getJSONObject("data");
String etcpToken = dataObj.getString("token");
// TODO 异步
ret = etcp.carNum(url, merchantNo, merchantKey, version, etcpToken);
/*
{
@@ -112,10 +112,13 @@ public class WxCarController extends BaseController
JSONArray arr = dataObj1.getJSONArray("carList");
for(int i=0;i<arr.size();i++) {
// TODO save car
// check carNum+cUserId是否存在, 不存在新建
// wxCUserCarService.saveOrUpdate();
}
// c端必须保存此token
return new ResultData(dataObj1);
} else {
logger.error("共同登录失败: "+phone);
return new ResultData(ErrorCode.ETCP_LOGIN_FAIL.getCode(), "共同登录失败");
}
} else if (park.getVendorType() == EnumCarVendor.CAR_TJD.getCode()){
@@ -279,7 +282,7 @@ public class WxCarController extends BaseController
// TODO remove carNumber
return new ResultData();
} else {
return new ResultData(500, "解绑车牌失败");
return new ResultData(ErrorCode.TJD_UNBIND_FAIL, "解绑车牌失败");
}
}
return new ResultData(ErrorCode.CAR_VENDOR_NOT_SUPPORT.getCode(), "解绑车牌失败");


+ 21
- 2
mallinkCApi/src/main/java/com/simple/controller/WxUserGrantController.java View File

@@ -14,7 +14,9 @@ import com.simple.common.Result;
import com.simple.common.ResultData;
import com.simple.domain.po.WxAppinfo;
import com.simple.domain.po.WxCUser;
import com.simple.domain.po.WxCUserCar;
import com.simple.service.WxAppinfoService;
import com.simple.service.WxCUserCarService;
import com.simple.service.WxCUserService;
import com.simple.utils.IPUtil;
import io.swagger.annotations.ApiImplicitParam;
@@ -31,6 +33,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@@ -41,6 +44,9 @@ public class WxUserGrantController extends BaseController {
@Autowired
private WxCUserService wxCUserService;

@Autowired
private WxCUserCarService wxCUserCarService;

/**
* 用户登录
* @param map
@@ -227,11 +233,24 @@ public class WxUserGrantController extends BaseController {
}
}

@ApiOperation("获取用户信息")
@GetMapping("/findById")
@ApiOperation("获取当前用户信息")
@GetMapping("/userinfo")
public ResultData getUserInfo() {
WxCUser user = getUser();
return new ResultData(Result.SUCCESS,"查询成功",user);
}

//
@ApiOperation("获取当前用户车牌列表")
@GetMapping("/carlist")
public ResultData getCarList() {
WxCUser user = getUser();
WxCUserCar userCar = new WxCUserCar();
userCar.setTenantId(user.getTenantId());
userCar.setCUserId(user.getId());
List<WxCUserCar> list = wxCUserCarService.getList(userCar);
return new ResultData(Result.SUCCESS,"获取查询成功", list);
}


}

mallinkService/src/main/java/com/simple/domain/po/WxCUserCars.java → mallinkService/src/main/java/com/simple/domain/po/WxCUserCar.java View File

@@ -8,15 +8,15 @@ import java.util.List;
import javax.persistence.Id;
import java.io.Serializable;

@Table(name = "wx_c_user_cars")
public class WxCUserCars implements Serializable {
@Table(name = "wx_c_user_car")
public class WxCUserCar implements Serializable {
private static final long serialVersionUID = 1L;
@Id
protected Long id;
@Transient
protected List<String> ids;
protected List<Long> ids;
@Transient
protected String sortColumns;
@@ -32,10 +32,11 @@ public class WxCUserCars implements Serializable {
return sortColumns;
}
public List<String> getIds() {
public List<Long> getIds() {
return ids;
}
public void setIds(List<String> ids) {

public void setIds(List<Long> ids) {
this.ids = ids;
}
@@ -56,6 +57,12 @@ public class WxCUserCars implements Serializable {
/*更新时间**/
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;
/*停车厂家(2:TJD)**/
@io.swagger.annotations.ApiModelProperty(value="停车厂家(2:TJD)",name="vendorType")
private Integer vendorType;
/*停车厂家参数**/
@io.swagger.annotations.ApiModelProperty(value="停车厂家参数",name="vendorParams")
private String vendorParams;
public String getTenantId() {
return tenantId;
}
@@ -86,6 +93,18 @@ public class WxCUserCars implements Serializable {
public void setUpdateDate(Date _updateDate) {
updateDate = _updateDate;
}
public Integer getVendorType() {
return vendorType;
}
public void setVendorType(Integer _vendorType) {
vendorType = _vendorType;
}
public String getVendorParams() {
return vendorParams;
}
public void setVendorParams(String _vendorParams) {
vendorParams = _vendorParams;
}



@@ -97,6 +116,8 @@ public class WxCUserCars implements Serializable {
,CarNumber_ASC("`carNumber` ASC"),CarNumber_DESC("`carNumber` DESC")
,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
,VendorType_ASC("`vendorType` ASC"),VendorType_DESC("`vendorType` DESC")
,VendorParams_ASC("`vendorParams` ASC"),VendorParams_DESC("`vendorParams` DESC")
;
private String value;
Field(String value){
@@ -114,7 +135,7 @@ public class WxCUserCars implements Serializable {
}
}
public void setSortColumns(WxCUserCars.Field... fields)
public void setSortColumns(WxCUserCar.Field... fields)
{
if (fields == null || fields.length == 0) {
return;

+ 17
- 0
mallinkService/src/main/java/com/simple/mapper/WxCUserCarMapper.java View File

@@ -0,0 +1,17 @@
package com.simple.mapper;

import java.util.*;
import com.simple.common.CommonMapper;
import org.apache.ibatis.annotations.Param;
import com.simple.domain.po.WxCUserCar;

public interface WxCUserCarMapper extends CommonMapper<WxCUserCar, Long> {

List<WxCUserCar> findList(WxCUserCar wxCUserCar);

}

+ 0
- 17
mallinkService/src/main/java/com/simple/mapper/WxCUserCarsMapper.java View File

@@ -1,17 +0,0 @@
package com.simple.mapper;

import java.util.*;
import com.simple.common.CommonMapper;
import org.apache.ibatis.annotations.Param;
import com.simple.domain.po.WxCUserCars;

public interface WxCUserCarsMapper extends CommonMapper<WxCUserCars, String> {

List<WxCUserCars> findList(WxCUserCars wxCUserCars);

}

mallinkService/src/main/java/com/simple/service/WxCUserCarsService.java → mallinkService/src/main/java/com/simple/service/WxCUserCarService.java View File

@@ -2,19 +2,27 @@ package com.simple.service;

import java.util.*;
import com.github.pagehelper.PageInfo;
import com.simple.domain.po.WxCUserCars;
import com.simple.domain.po.WxCUserCar;

public interface WxCUserCarsService {
public interface WxCUserCarService {

/**
* 根据实体查询分页列表
*
* @param record
* @param offset
* @param limit
* @param pageIndex
* @param pageSize
* @return
*/
PageInfo<WxCUserCars> listAsPage(WxCUserCars record, Integer pageIndex, Integer pageSize);
PageInfo<WxCUserCar> listAsPage(WxCUserCar record, Integer pageIndex, Integer pageSize);

/**
* 根据实体查询列表
*
* @param record
* @return
*/
List<WxCUserCar> getList(WxCUserCar record);
/**
* 根据Id获得实体
@@ -22,14 +30,14 @@ public interface WxCUserCarsService {
* @param id
* @return
*/
WxCUserCars getById(Long id);
WxCUserCar getById(Long id);
/**
* 保存或更新实体
*
* @param record
*/
void saveOrUpdate(WxCUserCars record);
void saveOrUpdate(WxCUserCar record);

/**
* 根据Id删除实体

+ 10
- 2
mallinkService/src/main/java/com/simple/service/WxParkService.java View File

@@ -10,8 +10,8 @@ public interface WxParkService {
* 根据实体查询分页列表
*
* @param record
* @param offset
* @param limit
* @param pageIndex
* @param pageSize
* @return
*/
PageInfo<WxPark> listAsPage(WxPark record, Integer pageIndex, Integer pageSize);
@@ -23,6 +23,14 @@ public interface WxParkService {
* @return
*/
WxPark getById(Long id);

/**
* 根据tenantId获得实体
*
* @param tenantId
* @return
*/
WxPark getByTenantId(String tenantId);
/**
* 保存或更新实体


+ 59
- 0
mallinkService/src/main/java/com/simple/service/impl/WxCUserCarServiceImpl.java View File

@@ -0,0 +1,59 @@
package com.simple.service.impl;

import java.util.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.simple.domain.po.WxCUserCar;
import com.simple.mapper.WxCUserCarMapper;
import com.simple.service.WxCUserCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.simple.common.IdWorker;

@Service
public class WxCUserCarServiceImpl implements WxCUserCarService {
@Autowired
WxCUserCarMapper wxCUserCarMapper;


@Override
public PageInfo<WxCUserCar> listAsPage(WxCUserCar record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserCarMapper.findList(record));
}

@Override
public List<WxCUserCar> getList(WxCUserCar record) {
return wxCUserCarMapper.findList(record);
}

@Override
public WxCUserCar getById(Long id) {
return wxCUserCarMapper.selectByPrimaryKey(id);
}

@Override
public void saveOrUpdate(WxCUserCar record) {
if (record.getId() == null) {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxCUserCarMapper.insertSelective(record);
} else {
wxCUserCarMapper.updateByPrimaryKeySelective(record);
}
}

@Override
public void deleteById(Long id) {
wxCUserCarMapper.deleteByPrimaryKey(id);
}
}

+ 0
- 54
mallinkService/src/main/java/com/simple/service/impl/WxCUserCarsServiceImpl.java View File

@@ -1,54 +0,0 @@
package com.simple.service.impl;

import java.util.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.simple.domain.po.WxCUserCars;
import com.simple.mapper.WxCUserCarsMapper;
import com.simple.service.WxCUserCarsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.simple.common.IdWorker;

@Service
public class WxCUserCarsServiceImpl implements WxCUserCarsService {
@Autowired
WxCUserCarsMapper wxCUserCarsMapper;


@Override
public PageInfo<WxCUserCars> listAsPage(WxCUserCars record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserCarsMapper.findList(record));
}

@Override
public WxCUserCars getById(Long id) {
return wxCUserCarsMapper.selectByPrimaryKey(id);
}

@Override
public void saveOrUpdate(WxCUserCars record) {
if (record.getId() == null) {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxCUserCarsMapper.insertSelective(record);
} else {
wxCUserCarsMapper.updateByPrimaryKeySelective(record);
}
}

@Override
public void deleteById(Long id) {
wxCUserCarsMapper.deleteByPrimaryKey(id);
}
}

+ 1
- 1
mallinkService/src/main/java/com/simple/service/impl/WxMsgValidationcodeServiceImpl.java View File

@@ -145,7 +145,7 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic
wxMsgValidationcode.setExpiretime(expiredate);
wxMsgValidationcode.setCreatetime(createtime);
wxMsgValidationcodeMapper.insertSelective(wxMsgValidationcode);
return new ResultData(200,"发送成功");
return new ResultData(Result.SUCCESS,"发送成功");
}
return new ResultData(500,"发送失败");



+ 7
- 0
mallinkService/src/main/java/com/simple/service/impl/WxParkServiceImpl.java View File

@@ -27,6 +27,13 @@ public class WxParkServiceImpl implements WxParkService {
return wxParkMapper.selectByPrimaryKey(id);
}

@Override
public WxPark getByTenantId(String tenantId) {
WxPark wxPark = new WxPark();
wxPark.setTenantId(tenantId);
return wxParkMapper.selectOne(wxPark);
}

@Override
public void saveOrUpdate(WxPark record) {
if (record.getId() == null) {


mallinkService/src/main/resources/mapper/WxCUserCarsMapper.xml → mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.simple.mapper.WxCUserCarsMapper">
<resultMap id="BaseResultMap" type="com.simple.domain.po.WxCUserCars">
<mapper namespace="com.simple.mapper.WxCUserCarMapper">
<resultMap id="BaseResultMap" type="com.simple.domain.po.WxCUserCar">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
@@ -67,14 +67,9 @@
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</sql>
<select id="findList" parameterType="com.simple.domain.po.WxCUserCars" resultMap="BaseResultMap">
select <include refid="allColumns" /> from wx_c_user_cars
<select id="findList" parameterType="com.simple.domain.po.WxCUserCar" resultMap="BaseResultMap">
select <include refid="allColumns" /> from wx_c_user_car
<include refid="dynamicWhereConditions" />
</select>
</mapper>

+ 1
- 1
mallinkService/src/main/resources/mapper/WxOrderMapper.xml View File

@@ -102,7 +102,7 @@
o.c_user_id, u.phone, u.nick_name, c.price, c.sale_price,
o.status, o.coupon_status
from wx_order o
left join wx_coupon c on c.id = o.coupon_id
left join wx_coupon_order co on co.id = o.coupon_id
left join wx_coupon_verify v on v.coupon_id= o.coupon_id
left join wx_c_user u on u.id = o.c_user_id
<where>


Loading…
Cancel
Save