202506101156
This commit is contained in:
parent
e4d903483f
commit
d3f6e98dec
|
|
@ -4,8 +4,11 @@ import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.ControllerUtil.WechatApiUtil;
|
import com.ruoyi.system.ControllerUtil.WechatApiUtil;
|
||||||
import com.ruoyi.system.domain.*;
|
import com.ruoyi.system.domain.*;
|
||||||
|
import com.ruoyi.system.domain.AppleDoMain.OrderApple;
|
||||||
|
import com.ruoyi.system.domain.AppleDoMain.AddressApple;
|
||||||
import com.ruoyi.system.service.*;
|
import com.ruoyi.system.service.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|
@ -14,6 +17,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -23,14 +27,16 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import com.ruoyi.system.ControllerUtil.AppletControllerUtil;
|
import com.ruoyi.system.ControllerUtil.AppletControllerUtil;
|
||||||
import com.ruoyi.system.ControllerUtil.AppletLoginUtil;
|
import com.ruoyi.system.ControllerUtil.AppletLoginUtil;
|
||||||
import com.ruoyi.system.ControllerUtil.PageUtil;
|
import com.ruoyi.system.ControllerUtil.PageUtil;
|
||||||
|
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序控制器
|
* 小程序控制器
|
||||||
*
|
* <p>
|
||||||
* 提供小程序端所需的API接口
|
* 提供小程序端所需的API接口
|
||||||
* 主要功能:
|
* 主要功能:
|
||||||
* 1. 服务分类管理
|
* 1. 服务分类管理
|
||||||
|
|
@ -40,8 +46,8 @@ import com.github.pagehelper.PageHelper;
|
||||||
* 5. 用户信息验证
|
* 5. 用户信息验证
|
||||||
*
|
*
|
||||||
* @author Mr. Zhang Pan
|
* @author Mr. Zhang Pan
|
||||||
* @date 2025-05-26
|
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
|
* @date 2025-05-26
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class AppletController extends BaseController {
|
public class AppletController extends BaseController {
|
||||||
|
|
@ -58,12 +64,15 @@ public class AppletController extends BaseController {
|
||||||
private IServiceGoodsService serviceGoodsService;
|
private IServiceGoodsService serviceGoodsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUserAddressService userAddressService;
|
private IUserAddressService userAddressService;
|
||||||
|
@Autowired
|
||||||
|
private IOrderService orderService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取服务分类列表
|
* 获取服务分类列表
|
||||||
*
|
*
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 分类列表数据
|
* @return 分类列表数据
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 获取状态为启用的服务分类
|
* - 获取状态为启用的服务分类
|
||||||
* - 自动添加图片CDN前缀
|
* - 自动添加图片CDN前缀
|
||||||
|
|
@ -100,7 +109,7 @@ public class AppletController extends BaseController {
|
||||||
* @param name 配置项名称
|
* @param name 配置项名称
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 配置信息数据
|
* @return 配置信息数据
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 根据配置名称获取对应的配置值
|
* - 根据配置名称获取对应的配置值
|
||||||
* - 配置值以JSON格式返回
|
* - 配置值以JSON格式返回
|
||||||
|
|
@ -139,19 +148,23 @@ public class AppletController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(value = "/api/public/get/config")
|
@GetMapping(value = "/api/public/get/config")
|
||||||
public AjaxResult getconfig(HttpServletRequest request) {
|
public Map<String, Object> getconfig(HttpServletRequest request) {
|
||||||
|
Map<String, Object> map=new HashMap<>();
|
||||||
SiteConfig configQuery = new SiteConfig();
|
SiteConfig configQuery = new SiteConfig();
|
||||||
configQuery.setName("config_one");
|
configQuery.setName("config_one");
|
||||||
List<SiteConfig> list = siteConfigService.selectSiteConfigList(configQuery);
|
List<SiteConfig> list = siteConfigService.selectSiteConfigList(configQuery);
|
||||||
return success(list.get(0).getValue());
|
JSONObject jsonObject = JSONObject.parseObject(list.get(0).getValue());
|
||||||
|
// map.put("data",list.get(0).getValue());
|
||||||
|
// map.put("code",200);
|
||||||
|
// map.put("msg","成功");
|
||||||
|
|
||||||
|
|
||||||
|
return success(jsonObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户收货地址列表
|
* 查询用户收货地址列表
|
||||||
*
|
*
|
||||||
|
|
@ -159,11 +172,11 @@ public class AppletController extends BaseController {
|
||||||
* @param page 页码
|
* @param page 页码
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 分页地址列表
|
* @return 分页地址列表
|
||||||
*
|
* <p>
|
||||||
* 请求参数:
|
* 请求参数:
|
||||||
* - limit: 每页显示数量,默认15
|
* - limit: 每页显示数量,默认15
|
||||||
* - page: 页码,默认1
|
* - page: 页码,默认1
|
||||||
*
|
* <p>
|
||||||
* 返回格式:
|
* 返回格式:
|
||||||
* {
|
* {
|
||||||
* "code": 200,
|
* "code": 200,
|
||||||
|
|
@ -228,17 +241,555 @@ public class AppletController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据地址ID查询用户收货地址详情
|
||||||
|
*
|
||||||
|
* @param id 地址ID
|
||||||
|
* @param request HTTP请求对象
|
||||||
|
* @return 地址详细信息
|
||||||
|
* <p>
|
||||||
|
* 接口说明:
|
||||||
|
* - 根据地址ID获取单个地址的详细信息
|
||||||
|
* - 验证用户登录状态和地址归属权
|
||||||
|
* - 返回AddressApple格式的地址数据,用于前端修改页面
|
||||||
|
* <p>
|
||||||
|
* 返回格式:
|
||||||
|
* {
|
||||||
|
* "code": 200,
|
||||||
|
* "msg": "操作成功",
|
||||||
|
* "data": {
|
||||||
|
* "id": 160,
|
||||||
|
* "uid": 302,
|
||||||
|
* "name": "赵先生",
|
||||||
|
* "phone": "18709185987",
|
||||||
|
* "latitude": "34.15643",
|
||||||
|
* "longitude": "108.86683",
|
||||||
|
* "address_name": "陕西省西安市长安区榆林北段与建设大道交叉口处北侧",
|
||||||
|
* "address_info": "陕西省西安市长安区榆林北段与建设大道交叉口处",
|
||||||
|
* "info": "14号楼2302",
|
||||||
|
* "is_default": 0,
|
||||||
|
* "created_at": null,
|
||||||
|
* "updated_at": null
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
@GetMapping("/api/user/address/info/{id}")
|
||||||
|
public AjaxResult getAddressInfo(@PathVariable("id") Long id, HttpServletRequest request) {
|
||||||
|
try {
|
||||||
|
// 1. 参数验证
|
||||||
|
if (id == null || id <= 0) {
|
||||||
|
return error("地址ID无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 验证用户登录状态
|
||||||
|
String token = request.getHeader("token");
|
||||||
|
Map<String, Object> userValidation = AppletLoginUtil.validateUserToken(token, usersService);
|
||||||
|
if (!(Boolean) userValidation.get("valid")) {
|
||||||
|
return error("用户未登录或token无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 获取用户信息
|
||||||
|
Users user = (Users) userValidation.get("user");
|
||||||
|
if (user == null) {
|
||||||
|
return error("用户信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 查询地址信息
|
||||||
|
UserAddress userAddress = userAddressService.selectUserAddressById(id);
|
||||||
|
if (userAddress == null) {
|
||||||
|
return error("地址不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 验证地址归属权
|
||||||
|
if (!userAddress.getUid().equals(user.getId())) {
|
||||||
|
return error("无权访问该地址信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 转换为AddressApple格式并返回
|
||||||
|
AddressApple addressApple = AddressApple.fromUserAddress(userAddress);
|
||||||
|
|
||||||
|
return success(addressApple);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("查询用户地址详情异常:" + e.getMessage());
|
||||||
|
return error("查询地址详情失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户收货地址
|
||||||
|
*
|
||||||
|
* @param params 地址修改参数
|
||||||
|
* @param request HTTP请求对象
|
||||||
|
* @return 修改结果
|
||||||
|
* <p>
|
||||||
|
* 请求参数格式:
|
||||||
|
* {
|
||||||
|
* "id": 160,
|
||||||
|
* "name": "赵先生",
|
||||||
|
* "phone": "18709185987",
|
||||||
|
* "address_name": "陕西省西安市长安区榆林北段与建设大道交叉口处北侧",
|
||||||
|
* "address_info": "海菱路8号",
|
||||||
|
* "info": "14号楼2302",
|
||||||
|
* "is_default": 1,
|
||||||
|
* "latitude": "34.15643",
|
||||||
|
* "longitude": "108.86683"
|
||||||
|
* }
|
||||||
|
* <p>
|
||||||
|
* 接口说明:
|
||||||
|
* - 验证用户登录状态和地址归属权
|
||||||
|
* - 支持修改地址的所有字段
|
||||||
|
* - 自动处理默认地址逻辑(设为默认时会取消其他默认地址)
|
||||||
|
* - 返回修改后的地址信息
|
||||||
|
* <p>
|
||||||
|
* 返回格式:
|
||||||
|
* {
|
||||||
|
* "code": 200,
|
||||||
|
* "msg": "操作成功",
|
||||||
|
* "data": "地址修改成功"
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
@PostMapping("/api/user/address/edit")
|
||||||
|
public AjaxResult editAddress(@RequestBody Map<String, Object> params, HttpServletRequest request) {
|
||||||
|
try {
|
||||||
|
// 1. 参数验证
|
||||||
|
if (params == null || params.get("id") == null) {
|
||||||
|
return error("地址ID不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
Long addressId;
|
||||||
|
try {
|
||||||
|
addressId = Long.valueOf(params.get("id").toString());
|
||||||
|
if (addressId <= 0) {
|
||||||
|
return error("地址ID无效");
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return error("地址ID格式错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 验证用户登录状态
|
||||||
|
String token = request.getHeader("token");
|
||||||
|
Map<String, Object> userValidation = AppletLoginUtil.validateUserToken(token, usersService);
|
||||||
|
if (!(Boolean) userValidation.get("valid")) {
|
||||||
|
return error("用户未登录或token无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 获取用户信息
|
||||||
|
Users user = (Users) userValidation.get("user");
|
||||||
|
if (user == null) {
|
||||||
|
return error("用户信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 查询原地址信息并验证归属权
|
||||||
|
UserAddress existingAddress = userAddressService.selectUserAddressById(addressId);
|
||||||
|
if (existingAddress == null) {
|
||||||
|
return error("地址不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!existingAddress.getUid().equals(user.getId())) {
|
||||||
|
return error("无权修改该地址");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 构建更新的地址对象
|
||||||
|
UserAddress updateAddress = buildUpdateAddress(params, addressId, user.getId());
|
||||||
|
|
||||||
|
// 6. 验证必填字段
|
||||||
|
String validationResult = validateAddressParams(updateAddress);
|
||||||
|
if (validationResult != null) {
|
||||||
|
return error(validationResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 7. 处理默认地址逻辑
|
||||||
|
if (updateAddress.getIsDefault() != null && updateAddress.getIsDefault() == 1L) {
|
||||||
|
// 如果设置为默认地址,先将该用户的所有地址设为非默认
|
||||||
|
userAddressService.updateUserAddressDefault(user.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 8. 执行地址更新
|
||||||
|
int updateResult = userAddressService.updateUserAddress(updateAddress);
|
||||||
|
|
||||||
|
if (updateResult > 0) {
|
||||||
|
return success("地址修改成功");
|
||||||
|
} else {
|
||||||
|
return error("地址修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("修改用户地址异常:" + e.getMessage());
|
||||||
|
return error("修改地址失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建地址更新对象
|
||||||
|
*
|
||||||
|
* @param params 请求参数
|
||||||
|
* @param addressId 地址ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return UserAddress对象
|
||||||
|
*/
|
||||||
|
private UserAddress buildUpdateAddress(Map<String, Object> params, Long addressId, Long userId) {
|
||||||
|
UserAddress address = new UserAddress();
|
||||||
|
address.setId(addressId);
|
||||||
|
address.setUid(userId);
|
||||||
|
|
||||||
|
// 设置收货人姓名
|
||||||
|
if (params.get("name") != null) {
|
||||||
|
address.setName(params.get("name").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置联系电话
|
||||||
|
if (params.get("phone") != null) {
|
||||||
|
address.setPhone(params.get("phone").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置纬度
|
||||||
|
if (params.get("latitude") != null) {
|
||||||
|
address.setLatitude(params.get("latitude").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置经度
|
||||||
|
if (params.get("longitude") != null) {
|
||||||
|
address.setLongitude(params.get("longitude").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置地址名称
|
||||||
|
if (params.get("address_name") != null) {
|
||||||
|
address.setAddressName(params.get("address_name").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置地址信息
|
||||||
|
if (params.get("address_info") != null) {
|
||||||
|
address.setAddressInfo(params.get("address_info").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置详细地址
|
||||||
|
if (params.get("info") != null) {
|
||||||
|
address.setInfo(params.get("info").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置是否默认地址
|
||||||
|
if (params.get("is_default") != null) {
|
||||||
|
try {
|
||||||
|
Long isDefault = Long.valueOf(params.get("is_default").toString());
|
||||||
|
address.setIsDefault(isDefault);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果转换失败,设为非默认
|
||||||
|
address.setIsDefault(0L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证地址参数
|
||||||
|
*
|
||||||
|
* @param address 地址对象
|
||||||
|
* @return 验证错误信息,null表示验证通过
|
||||||
|
*/
|
||||||
|
private String validateAddressParams(UserAddress address) {
|
||||||
|
if (address.getName() == null || address.getName().isEmpty()) {
|
||||||
|
return "收货人姓名不能为空";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address.getPhone() == null || address.getPhone().isEmpty()) {
|
||||||
|
return "联系电话不能为空";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证手机号格式(简单验证)
|
||||||
|
if (!address.getPhone().matches("^1[3-9]\\d{9}$")) {
|
||||||
|
return "联系电话格式不正确";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address.getInfo() == null || address.getInfo().isEmpty()) {
|
||||||
|
return "详细地址不能为空";
|
||||||
|
}
|
||||||
|
|
||||||
|
return null; // 验证通过
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户收货地址
|
||||||
|
*
|
||||||
|
* @param params 地址新增参数
|
||||||
|
* @param request HTTP请求对象
|
||||||
|
* @return 新增结果
|
||||||
|
* <p>
|
||||||
|
* 请求参数格式:
|
||||||
|
* {
|
||||||
|
* "name": "何飞飞",
|
||||||
|
* "phone": "15002954325",
|
||||||
|
* "address_name": "陕西省西安市未央区未央路3号(龙首原地铁站C出口步行180米)",
|
||||||
|
* "address_info": "凤鑫城购物中心(未央路店)",
|
||||||
|
* "info": "458",
|
||||||
|
* "is_default": true,
|
||||||
|
* "latitude": 34.294248,
|
||||||
|
* "longitude": 108.948261
|
||||||
|
* }
|
||||||
|
* <p>
|
||||||
|
* 接口说明:
|
||||||
|
* - 验证用户登录状态
|
||||||
|
* - 支持新增地址的所有字段
|
||||||
|
* - 自动处理默认地址逻辑(设为默认时会取消其他默认地址)
|
||||||
|
* - 返回新增后的地址信息
|
||||||
|
* <p>
|
||||||
|
* 返回格式:
|
||||||
|
* {
|
||||||
|
* "code": 200,
|
||||||
|
* "msg": "操作成功",
|
||||||
|
* "data": "地址新增成功"
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
@PostMapping("/api/user/address/add")
|
||||||
|
public AjaxResult addAddress(@RequestBody Map<String, Object> params, HttpServletRequest request) {
|
||||||
|
try {
|
||||||
|
// 1. 验证用户登录状态
|
||||||
|
String token = request.getHeader("token");
|
||||||
|
Map<String, Object> userValidation = AppletLoginUtil.validateUserToken(token, usersService);
|
||||||
|
if (!(Boolean) userValidation.get("valid")) {
|
||||||
|
return error("用户未登录或token无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 获取用户信息
|
||||||
|
Users user = (Users) userValidation.get("user");
|
||||||
|
if (user == null) {
|
||||||
|
return error("用户信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 构建新增的地址对象
|
||||||
|
UserAddress newAddress = buildNewAddress(params, user.getId());
|
||||||
|
|
||||||
|
// 4. 验证必填字段
|
||||||
|
String validationResult = validateAddressParams(newAddress);
|
||||||
|
if (validationResult != null) {
|
||||||
|
return error(validationResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 处理默认地址逻辑
|
||||||
|
if (newAddress.getIsDefault() != null && newAddress.getIsDefault() == 1L) {
|
||||||
|
// 如果设置为默认地址,先将该用户的所有地址设为非默认
|
||||||
|
userAddressService.updateUserAddressDefault(user.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 执行地址新增
|
||||||
|
int insertResult = userAddressService.insertUserAddress(newAddress);
|
||||||
|
|
||||||
|
if (insertResult > 0) {
|
||||||
|
return success("地址新增成功");
|
||||||
|
} else {
|
||||||
|
return error("地址新增失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("新增用户地址异常:" + e.getMessage());
|
||||||
|
return error("新增地址失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建地址新增对象
|
||||||
|
*
|
||||||
|
* @param params 请求参数
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return UserAddress对象
|
||||||
|
*/
|
||||||
|
private UserAddress buildNewAddress(Map<String, Object> params, Long userId) {
|
||||||
|
UserAddress address = new UserAddress();
|
||||||
|
address.setUid(userId);
|
||||||
|
|
||||||
|
// 设置收货人姓名
|
||||||
|
if (params.get("name") != null) {
|
||||||
|
address.setName(params.get("name").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置联系电话
|
||||||
|
if (params.get("phone") != null) {
|
||||||
|
address.setPhone(params.get("phone").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置纬度
|
||||||
|
if (params.get("latitude") != null) {
|
||||||
|
address.setLatitude(params.get("latitude").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置经度
|
||||||
|
if (params.get("longitude") != null) {
|
||||||
|
address.setLongitude(params.get("longitude").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置地址名称
|
||||||
|
if (params.get("address_name") != null) {
|
||||||
|
address.setAddressName(params.get("address_name").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置地址信息
|
||||||
|
if (params.get("address_info") != null) {
|
||||||
|
address.setAddressInfo(params.get("address_info").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置详细地址
|
||||||
|
if (params.get("info") != null) {
|
||||||
|
address.setInfo(params.get("info").toString().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置是否默认地址
|
||||||
|
if (params.get("is_default") != null) {
|
||||||
|
try {
|
||||||
|
// 处理布尔值或数字值
|
||||||
|
Object isDefaultObj = params.get("is_default");
|
||||||
|
Long isDefault = 0L;
|
||||||
|
|
||||||
|
if (isDefaultObj instanceof Boolean) {
|
||||||
|
isDefault = ((Boolean) isDefaultObj) ? 1L : 0L;
|
||||||
|
} else if (isDefaultObj instanceof Number) {
|
||||||
|
isDefault = ((Number) isDefaultObj).longValue();
|
||||||
|
} else {
|
||||||
|
String isDefaultStr = isDefaultObj.toString().toLowerCase();
|
||||||
|
if ("true".equals(isDefaultStr) || "1".equals(isDefaultStr)) {
|
||||||
|
isDefault = 1L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
address.setIsDefault(isDefault);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 如果转换失败,设为非默认
|
||||||
|
address.setIsDefault(0L);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有指定,默认设为非默认地址
|
||||||
|
address.setIsDefault(0L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("api/service/order/lst")
|
||||||
|
public AjaxResult getserviceorderlst(@RequestBody Map<String, Object> params,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
|
||||||
|
int page = (int) params.get("page");
|
||||||
|
int limit = (int) params.get("limit");
|
||||||
|
String status = (String) params.get("status");
|
||||||
|
|
||||||
|
// 1. 验证分页参数
|
||||||
|
Map<String, Object> pageValidation = PageUtil.validatePageParams(page, limit);
|
||||||
|
if (!(Boolean) pageValidation.get("valid")) {
|
||||||
|
return error((String) pageValidation.get("message"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 验证用户登录状态
|
||||||
|
String token = request.getHeader("token");
|
||||||
|
Map<String, Object> userValidation = AppletLoginUtil.validateUserToken(token, usersService);
|
||||||
|
if (!(Boolean) userValidation.get("valid")) {
|
||||||
|
return error("用户未登录或token无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 获取用户信息
|
||||||
|
Users user = (Users) userValidation.get("user");
|
||||||
|
if (user == null) {
|
||||||
|
return error("用户信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 设置分页参数
|
||||||
|
PageHelper.startPage(page, limit);
|
||||||
|
|
||||||
|
// 5. 查询用户地址列表
|
||||||
|
OrderApple order = new OrderApple();
|
||||||
|
order.setType(1);
|
||||||
|
order.setUid(user.getId());
|
||||||
|
|
||||||
|
if (StringUtils.isNotNull(status) && !"".equals(status)) {
|
||||||
|
order.setStatus(Long.valueOf(status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<OrderApple> orderList = orderService.selectOrderAppleList(order);
|
||||||
|
for (OrderApple orderdata : orderList) {
|
||||||
|
Map<String, Object> jsonObject = new HashMap<>();
|
||||||
|
if (orderdata.getProduct_id() != null) {
|
||||||
|
ServiceGoods serviceGoods = serviceGoodsService.selectServiceGoodsById(orderdata.getProduct_id());
|
||||||
|
if (serviceGoods != null) {
|
||||||
|
jsonObject.put("title", serviceGoods.getTitle());
|
||||||
|
jsonObject.put("icon", "https://img.huafurenjia.cn/" + serviceGoods.getIcon());
|
||||||
|
jsonObject.put("id", serviceGoods.getId());
|
||||||
|
jsonObject.put("price_zn", serviceGoods.getPriceZn());
|
||||||
|
jsonObject.put("sub_title", serviceGoods.getSubTitle());
|
||||||
|
orderdata.setProduct(jsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 获取分页信息并构建响应
|
||||||
|
TableDataInfo tableDataInfo = getDataTable(orderList);
|
||||||
|
|
||||||
|
// 7. 构建符合要求的分页响应格式
|
||||||
|
Map<String, Object> pageData = PageUtil.buildPageResponse(tableDataInfo, page, limit);
|
||||||
|
|
||||||
|
return success(pageData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/api/goods/order/lst")
|
||||||
|
public AjaxResult getgoodsorderlst(@RequestBody Map<String, Object> params,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
|
||||||
|
int page = (int) params.get("page");
|
||||||
|
int limit = (int) params.get("limit");
|
||||||
|
String status = (String) params.get("status");
|
||||||
|
|
||||||
|
// 1. 验证分页参数
|
||||||
|
Map<String, Object> pageValidation = PageUtil.validatePageParams(page, limit);
|
||||||
|
if (!(Boolean) pageValidation.get("valid")) {
|
||||||
|
return error((String) pageValidation.get("message"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 验证用户登录状态
|
||||||
|
String token = request.getHeader("token");
|
||||||
|
Map<String, Object> userValidation = AppletLoginUtil.validateUserToken(token, usersService);
|
||||||
|
if (!(Boolean) userValidation.get("valid")) {
|
||||||
|
return error("用户未登录或token无效");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 获取用户信息
|
||||||
|
Users user = (Users) userValidation.get("user");
|
||||||
|
if (user == null) {
|
||||||
|
return error("用户信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 设置分页参数
|
||||||
|
PageHelper.startPage(page, limit);
|
||||||
|
|
||||||
|
// 5. 查询用户地址列表
|
||||||
|
OrderApple order = new OrderApple();
|
||||||
|
order.setType(2);
|
||||||
|
order.setUid(user.getId());
|
||||||
|
|
||||||
|
if (StringUtils.isNotNull(status) && !"".equals(status)) {
|
||||||
|
order.setStatus(Long.valueOf(status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<OrderApple> orderList = orderService.selectOrderAppleList(order);
|
||||||
|
|
||||||
|
// 6. 获取分页信息并构建响应
|
||||||
|
TableDataInfo tableDataInfo = getDataTable(orderList);
|
||||||
|
|
||||||
|
// 7. 构建符合要求的分页响应格式
|
||||||
|
Map<String, Object> pageData = PageUtil.buildPageResponse(tableDataInfo, page, limit);
|
||||||
|
|
||||||
|
return success(pageData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/api/user/login")
|
@PostMapping(value = "/api/user/login")
|
||||||
public AjaxResult getuserlogin(HttpServletRequest request) {
|
public AjaxResult getuserlogin(HttpServletRequest request) {
|
||||||
String token=request.getHeader("token");
|
String token = request.getHeader("token");
|
||||||
Users users=usersService.selectUsersByRememberToken(token);
|
Users users = usersService.selectUsersByRememberToken(token);
|
||||||
if (users!=null){
|
if (users != null) {
|
||||||
users.setRemember_token(users.getRememberToken());
|
users.setRemember_token(users.getRememberToken());
|
||||||
return success(users);
|
return success(users);
|
||||||
}else{
|
} else {
|
||||||
return error("用户不存在");
|
return error("用户不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -317,7 +868,7 @@ public class AppletController extends BaseController {
|
||||||
* @param id 商品ID
|
* @param id 商品ID
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 商品详细信息
|
* @return 商品详细信息
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 根据商品ID获取详细信息
|
* - 根据商品ID获取详细信息
|
||||||
* - 返回格式化的商品数据
|
* - 返回格式化的商品数据
|
||||||
|
|
@ -344,13 +895,14 @@ public class AppletController extends BaseController {
|
||||||
return error("查询商品详情失败:" + e.getMessage());
|
return error("查询商品详情失败:" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取广告图片列表
|
* 获取广告图片列表
|
||||||
*
|
*
|
||||||
* @param type 广告类型
|
* @param type 广告类型
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 广告图片列表
|
* @return 广告图片列表
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 根据广告类型获取对应的图片列表
|
* - 根据广告类型获取对应的图片列表
|
||||||
* - 自动添加图片CDN前缀
|
* - 自动添加图片CDN前缀
|
||||||
|
|
@ -388,13 +940,13 @@ public class AppletController extends BaseController {
|
||||||
* @param params 请求参数
|
* @param params 请求参数
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 登录结果
|
* @return 登录结果
|
||||||
*
|
* <p>
|
||||||
* 请求参数格式:
|
* 请求参数格式:
|
||||||
* {
|
* {
|
||||||
* "usercode": "微信小程序登录code",
|
* "usercode": "微信小程序登录code",
|
||||||
* "code": "手机号授权code"
|
* "code": "手机号授权code"
|
||||||
* }
|
* }
|
||||||
*
|
* <p>
|
||||||
* 返回数据格式:
|
* 返回数据格式:
|
||||||
* {
|
* {
|
||||||
* "code": 200,
|
* "code": 200,
|
||||||
|
|
@ -411,7 +963,7 @@ public class AppletController extends BaseController {
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*
|
* <p>
|
||||||
* 登录流程:
|
* 登录流程:
|
||||||
* 1. 验证请求参数
|
* 1. 验证请求参数
|
||||||
* 2. 通过usercode获取微信openid
|
* 2. 通过usercode获取微信openid
|
||||||
|
|
@ -426,27 +978,26 @@ public class AppletController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(value = "/api/user/info")
|
@GetMapping(value = "/api/user/info")
|
||||||
public AjaxResult getUserByPhone(HttpServletRequest request) {
|
public AjaxResult getUserByPhone(HttpServletRequest request) {
|
||||||
String token=request.getHeader("token");
|
String token = request.getHeader("token");
|
||||||
Map<String, Object> order_num=new HashMap<>();
|
Map<String, Object> order_num = new HashMap<>();
|
||||||
Map<String, Object> goods_order_num=new HashMap<>();
|
Map<String, Object> goods_order_num = new HashMap<>();
|
||||||
Users users=usersService.selectUsersByRememberToken(token);
|
Users users = usersService.selectUsersByRememberToken(token);
|
||||||
if (users!=null){
|
if (users != null) {
|
||||||
users.setRemember_token(users.getRememberToken());
|
users.setRemember_token(users.getRememberToken());
|
||||||
order_num.put("pending_accept",2);
|
order_num.put("pending_accept", 2);
|
||||||
order_num.put("pending_service",0);
|
order_num.put("pending_service", 0);
|
||||||
order_num.put("in_service",0);
|
order_num.put("in_service", 0);
|
||||||
order_num.put("other_status",0);
|
order_num.put("other_status", 0);
|
||||||
users.setOrder_num(order_num);
|
users.setOrder_num(order_num);
|
||||||
goods_order_num.put("pending_accept",0);
|
goods_order_num.put("pending_accept", 0);
|
||||||
goods_order_num.put("pending_service",3);
|
goods_order_num.put("pending_service", 3);
|
||||||
goods_order_num.put("in_service",0);
|
goods_order_num.put("in_service", 0);
|
||||||
goods_order_num.put("other_status",0);
|
goods_order_num.put("other_status", 0);
|
||||||
users.setGoods_order_num(goods_order_num);
|
users.setGoods_order_num(goods_order_num);
|
||||||
return success(users);
|
return success(users);
|
||||||
}else{
|
} else {
|
||||||
return error("用户不存在");
|
return error("用户不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -458,12 +1009,12 @@ public class AppletController extends BaseController {
|
||||||
*
|
*
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 验证结果
|
* @return 验证结果
|
||||||
*
|
* <p>
|
||||||
* 请求头格式:
|
* 请求头格式:
|
||||||
* Authorization: Bearer <token>
|
* Authorization: Bearer <token>
|
||||||
* 或
|
* 或
|
||||||
* token: <token>
|
* token: <token>
|
||||||
*
|
* <p>
|
||||||
* 返回数据格式:
|
* 返回数据格式:
|
||||||
* {
|
* {
|
||||||
* "code": 200,
|
* "code": 200,
|
||||||
|
|
@ -474,7 +1025,7 @@ public class AppletController extends BaseController {
|
||||||
* "message": "token验证成功"
|
* "message": "token验证成功"
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 验证用户token的有效性
|
* - 验证用户token的有效性
|
||||||
* - 返回用户基本信息
|
* - 返回用户基本信息
|
||||||
|
|
@ -511,32 +1062,30 @@ public class AppletController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取服务商品详细信息
|
* 获取服务商品详细信息
|
||||||
*
|
*
|
||||||
* @param params 商品ID
|
* @param params 商品ID
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 商品详细信息
|
* @return 商品详细信息
|
||||||
*
|
* <p>
|
||||||
* 接口说明:
|
* 接口说明:
|
||||||
* - 根据商品ID获取详细信息
|
* - 根据商品ID获取详细信息
|
||||||
* - 返回格式化的商品数据
|
* - 返回格式化的商品数据
|
||||||
* - 包含图片、基础信息等数组数据
|
* - 包含图片、基础信息等数组数据
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/user/phone/login")
|
@GetMapping(value = "/user/phone/login")
|
||||||
public AjaxResult getUserByPhone(@RequestBody Map<String, Object> params,HttpServletRequest request) {
|
public AjaxResult getUserByPhone(@RequestBody Map<String, Object> params, HttpServletRequest request) {
|
||||||
String code=(String)params.get("code");
|
String code = (String) params.get("code");
|
||||||
String usercode=(String)params.get("phone");
|
String usercode = (String) params.get("phone");
|
||||||
|
|
||||||
if (code==null){
|
if (code == null) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (usercode==null){
|
if (usercode == null) {
|
||||||
|
|
||||||
}
|
}
|
||||||
return success( );
|
return success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -547,7 +1096,7 @@ public class AppletController extends BaseController {
|
||||||
* @param params 支付参数
|
* @param params 支付参数
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 支付结果
|
* @return 支付结果
|
||||||
*
|
* <p>
|
||||||
* 请求参数格式:
|
* 请求参数格式:
|
||||||
* {
|
* {
|
||||||
* "orderNo": "订单号",
|
* "orderNo": "订单号",
|
||||||
|
|
@ -556,7 +1105,7 @@ public class AppletController extends BaseController {
|
||||||
* "body": "商品描述",
|
* "body": "商品描述",
|
||||||
* "notifyUrl": "回调地址"
|
* "notifyUrl": "回调地址"
|
||||||
* }
|
* }
|
||||||
*
|
* <p>
|
||||||
* 返回数据格式:
|
* 返回数据格式:
|
||||||
* {
|
* {
|
||||||
* "code": 200,
|
* "code": 200,
|
||||||
|
|
@ -639,7 +1188,7 @@ public class AppletController extends BaseController {
|
||||||
* @param params 代付参数
|
* @param params 代付参数
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 代付结果
|
* @return 代付结果
|
||||||
*
|
* <p>
|
||||||
* 请求参数格式:
|
* 请求参数格式:
|
||||||
* {
|
* {
|
||||||
* "orderNo": "原订单号",
|
* "orderNo": "原订单号",
|
||||||
|
|
@ -682,7 +1231,7 @@ public class AppletController extends BaseController {
|
||||||
*
|
*
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 回调处理结果
|
* @return 回调处理结果
|
||||||
*
|
* <p>
|
||||||
* 注意:此接口供微信服务器回调使用,不需要用户认证
|
* 注意:此接口供微信服务器回调使用,不需要用户认证
|
||||||
* 返回格式必须是XML格式,用于告知微信处理结果
|
* 返回格式必须是XML格式,用于告知微信处理结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -721,7 +1270,7 @@ public class AppletController extends BaseController {
|
||||||
* @param params 退款参数
|
* @param params 退款参数
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 退款结果
|
* @return 退款结果
|
||||||
*
|
* <p>
|
||||||
* 请求参数格式:
|
* 请求参数格式:
|
||||||
* {
|
* {
|
||||||
* "orderNo": "原订单号",
|
* "orderNo": "原订单号",
|
||||||
|
|
@ -763,7 +1312,7 @@ public class AppletController extends BaseController {
|
||||||
* @param params 付款参数
|
* @param params 付款参数
|
||||||
* @param request HTTP请求对象
|
* @param request HTTP请求对象
|
||||||
* @return 付款结果
|
* @return 付款结果
|
||||||
*
|
* <p>
|
||||||
* 请求参数格式:
|
* 请求参数格式:
|
||||||
* {
|
* {
|
||||||
* "partnerTradeNo": "商户订单号",
|
* "partnerTradeNo": "商户订单号",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
package com.ruoyi.system.domain.AppleDoMain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序用户地址对象 AddressApple
|
||||||
|
* 用于小程序接口返回地址数据
|
||||||
|
*
|
||||||
|
* @author Mr. Zhang Pan
|
||||||
|
* @date 2025-01-15
|
||||||
|
*/
|
||||||
|
public class AddressApple extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 地址ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 用户ID */
|
||||||
|
private Long uid;
|
||||||
|
|
||||||
|
/** 收货人姓名 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/** 地图点选地址名称 */
|
||||||
|
private String address_name;
|
||||||
|
|
||||||
|
/** 地图点选地址信息 */
|
||||||
|
private String address_info;
|
||||||
|
|
||||||
|
/** 详细地址信息 */
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/** 是否默认地址 1:是 0:否 */
|
||||||
|
private Long is_default;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date created_at;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updated_at;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleted_at;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(Long uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(String latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(String longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress_name() {
|
||||||
|
return address_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress_name(String address_name) {
|
||||||
|
this.address_name = address_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress_info() {
|
||||||
|
return address_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress_info(String address_info) {
|
||||||
|
this.address_info = address_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInfo(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIs_default() {
|
||||||
|
return is_default;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIs_default(Long is_default) {
|
||||||
|
this.is_default = is_default;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreated_at() {
|
||||||
|
return created_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated_at(Date created_at) {
|
||||||
|
this.created_at = created_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdated_at() {
|
||||||
|
return updated_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdated_at(Date updated_at) {
|
||||||
|
this.updated_at = updated_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDeleted_at() {
|
||||||
|
return deleted_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted_at(Date deleted_at) {
|
||||||
|
this.deleted_at = deleted_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从UserAddress转换为AddressApple
|
||||||
|
* @param userAddress 原始地址对象
|
||||||
|
* @return AddressApple对象
|
||||||
|
*/
|
||||||
|
public static AddressApple fromUserAddress(com.ruoyi.system.domain.UserAddress userAddress) {
|
||||||
|
if (userAddress == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddressApple addressApple = new AddressApple();
|
||||||
|
addressApple.setId(userAddress.getId());
|
||||||
|
addressApple.setUid(userAddress.getUid());
|
||||||
|
addressApple.setName(userAddress.getName());
|
||||||
|
addressApple.setPhone(userAddress.getPhone());
|
||||||
|
addressApple.setLatitude(userAddress.getLatitude());
|
||||||
|
addressApple.setLongitude(userAddress.getLongitude());
|
||||||
|
addressApple.setAddress_name(userAddress.getAddressName());
|
||||||
|
addressApple.setAddress_info(userAddress.getAddressInfo());
|
||||||
|
addressApple.setInfo(userAddress.getInfo());
|
||||||
|
addressApple.setIs_default(userAddress.getIsDefault());
|
||||||
|
addressApple.setCreated_at(userAddress.getCreatedAt());
|
||||||
|
addressApple.setUpdated_at(userAddress.getUpdatedAt());
|
||||||
|
addressApple.setDeleted_at(userAddress.getDeletedAt());
|
||||||
|
|
||||||
|
return addressApple;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,146 @@
|
||||||
|
package com.ruoyi.system.domain.AppleDoMain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class OrderApple extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
private Date created_at;// "2024-08-31 12:04:50"
|
||||||
|
private Long id;// 260
|
||||||
|
private Integer is_comment;// 1
|
||||||
|
private String make_hour;// "14:00-15:00"
|
||||||
|
private Integer make_time;// "2024-08-31 14:00-15:00"
|
||||||
|
private String name;// "赵先生"
|
||||||
|
private Integer num;// 1
|
||||||
|
private String order_id;// "B831770908583777"
|
||||||
|
private Map<String,Object> product;// "{}"product
|
||||||
|
private Long product_id;// 62
|
||||||
|
private String sku;// null
|
||||||
|
private Long status;// 4
|
||||||
|
private String total_price;// "68.00"
|
||||||
|
private Integer type;// 1
|
||||||
|
private Long uid;// : 302
|
||||||
|
|
||||||
|
public Long getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(Long uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotal_price() {
|
||||||
|
return total_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotal_price(String total_price) {
|
||||||
|
this.total_price = total_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Long status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProduct_id() {
|
||||||
|
return product_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProduct_id(Long product_id) {
|
||||||
|
this.product_id = product_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getProduct() {
|
||||||
|
return product;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProduct(Map<String, Object> product) {
|
||||||
|
this.product = product;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrder_id() {
|
||||||
|
return order_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder_id(String order_id) {
|
||||||
|
this.order_id = order_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNum() {
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum(Integer num) {
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMake_time() {
|
||||||
|
return make_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMake_time(Integer make_time) {
|
||||||
|
this.make_time = make_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMake_hour() {
|
||||||
|
return make_hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMake_hour(String make_hour) {
|
||||||
|
this.make_hour = make_hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIs_comment() {
|
||||||
|
return is_comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIs_comment(Integer is_comment) {
|
||||||
|
this.is_comment = is_comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreated_at() {
|
||||||
|
return created_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated_at(Date created_at) {
|
||||||
|
this.created_at = created_at;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.AppleDoMain.OrderApple;
|
||||||
import com.ruoyi.system.domain.Order;
|
import com.ruoyi.system.domain.Order;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,6 +21,16 @@ public interface OrderMapper
|
||||||
*/
|
*/
|
||||||
public Order selectOrderById(Long id);
|
public Order selectOrderById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序查询服务订单列表
|
||||||
|
*
|
||||||
|
* @param orderApple 服务订单
|
||||||
|
* @return 服务订单集合
|
||||||
|
*/
|
||||||
|
public List<OrderApple> selectOrderAppleList(OrderApple orderApple);
|
||||||
/**
|
/**
|
||||||
* 查询服务订单列表
|
* 查询服务订单列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.service;
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.AppleDoMain.OrderApple;
|
||||||
import com.ruoyi.system.domain.Order;
|
import com.ruoyi.system.domain.Order;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,7 +21,13 @@ public interface IOrderService
|
||||||
*/
|
*/
|
||||||
public Order selectOrderById(Long id);
|
public Order selectOrderById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序查询服务订单列表
|
||||||
|
*
|
||||||
|
* @param orderApple 服务订单
|
||||||
|
* @return 服务订单集合
|
||||||
|
*/
|
||||||
|
public List<OrderApple> selectOrderAppleList(OrderApple orderApple);
|
||||||
|
|
||||||
public Order selectOrderByOrderId(String orderId);
|
public Order selectOrderByOrderId(String orderId);
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.AppleDoMain.OrderApple;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.system.mapper.OrderMapper;
|
import com.ruoyi.system.mapper.OrderMapper;
|
||||||
|
|
@ -33,7 +35,15 @@ public class OrderServiceImpl implements IOrderService
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序查询服务订单列表
|
||||||
|
*
|
||||||
|
* @param orderApple 服务订单
|
||||||
|
* @return 服务订单集合
|
||||||
|
*/
|
||||||
|
public List<OrderApple> selectOrderAppleList(OrderApple orderApple){
|
||||||
|
return orderMapper.selectOrderAppleList(orderApple);
|
||||||
|
}
|
||||||
|
|
||||||
public Order selectOrderByOrderId(String orderId){
|
public Order selectOrderByOrderId(String orderId){
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,149 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.OrderMapper">
|
<mapper namespace="com.ruoyi.system.mapper.OrderMapper">
|
||||||
|
|
||||||
<resultMap type="Order" id="OrderResult">
|
<resultMap type="Order" id="OrderResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id"/>
|
||||||
<result property="type" column="type" />
|
<result property="type" column="type"/>
|
||||||
<result property="mainOrderId" column="main_order_id" />
|
<result property="mainOrderId" column="main_order_id"/>
|
||||||
<result property="orderId" column="order_id" />
|
<result property="orderId" column="order_id"/>
|
||||||
<result property="transactionId" column="transaction_id" />
|
<result property="transactionId" column="transaction_id"/>
|
||||||
<result property="createType" column="create_type" />
|
<result property="createType" column="create_type"/>
|
||||||
<result property="createPhone" column="create_phone" />
|
<result property="createPhone" column="create_phone"/>
|
||||||
<result property="uid" column="uid" />
|
<result property="uid" column="uid"/>
|
||||||
<result property="productId" column="product_id" />
|
<result property="productId" column="product_id"/>
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name"/>
|
||||||
<result property="phone" column="phone" />
|
<result property="phone" column="phone"/>
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address"/>
|
||||||
<result property="makeTime" column="make_time" />
|
<result property="makeTime" column="make_time"/>
|
||||||
<result property="makeHour" column="make_hour" />
|
<result property="makeHour" column="make_hour"/>
|
||||||
<result property="num" column="num" />
|
<result property="num" column="num"/>
|
||||||
<result property="totalPrice" column="total_price" />
|
<result property="totalPrice" column="total_price"/>
|
||||||
<result property="goodPrice" column="good_price" />
|
<result property="goodPrice" column="good_price"/>
|
||||||
<result property="servicePrice" column="service_price" />
|
<result property="servicePrice" column="service_price"/>
|
||||||
<result property="payPrice" column="pay_price" />
|
<result property="payPrice" column="pay_price"/>
|
||||||
<result property="couponId" column="coupon_id" />
|
<result property="couponId" column="coupon_id"/>
|
||||||
<result property="deduction" column="deduction" />
|
<result property="deduction" column="deduction"/>
|
||||||
<result property="payTime" column="pay_time" />
|
<result property="payTime" column="pay_time"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status"/>
|
||||||
<result property="isPause" column="is_pause" />
|
<result property="isPause" column="is_pause"/>
|
||||||
<result property="mark" column="mark" />
|
<result property="mark" column="mark"/>
|
||||||
<result property="addressId" column="address_id" />
|
<result property="addressId" column="address_id"/>
|
||||||
<result property="sku" column="sku" />
|
<result property="sku" column="sku"/>
|
||||||
<result property="workerId" column="worker_id" />
|
<result property="workerId" column="worker_id"/>
|
||||||
<result property="firstWorkerId" column="first_worker_id" />
|
<result property="firstWorkerId" column="first_worker_id"/>
|
||||||
<result property="receiveTime" column="receive_time" />
|
<result property="receiveTime" column="receive_time"/>
|
||||||
<result property="isComment" column="is_comment" />
|
<result property="isComment" column="is_comment"/>
|
||||||
<result property="receiveType" column="receive_type" />
|
<result property="receiveType" column="receive_type"/>
|
||||||
<result property="isAccept" column="is_accept" />
|
<result property="isAccept" column="is_accept"/>
|
||||||
<result property="middlePhone" column="middle_phone" />
|
<result property="middlePhone" column="middle_phone"/>
|
||||||
<result property="userPhone" column="user_phone" />
|
<result property="userPhone" column="user_phone"/>
|
||||||
<result property="workerPhone" column="worker_phone" />
|
<result property="workerPhone" column="worker_phone"/>
|
||||||
<result property="addressEn" column="address_en" />
|
<result property="addressEn" column="address_en"/>
|
||||||
<result property="uidAdmin" column="uid_admin" />
|
<result property="uidAdmin" column="uid_admin"/>
|
||||||
<result property="addressAdmin" column="address_admin" />
|
<result property="addressAdmin" column="address_admin"/>
|
||||||
<result property="logStatus" column="log_status" />
|
<result property="logStatus" column="log_status"/>
|
||||||
<result property="logJson" column="log_json" />
|
<result property="logJson" column="log_json"/>
|
||||||
<result property="jsonStatus" column="json_status" />
|
<result property="jsonStatus" column="json_status"/>
|
||||||
<result property="logImages" column="log_images" />
|
<result property="logImages" column="log_images"/>
|
||||||
<result property="createdAt" column="created_at" />
|
<result property="createdAt" column="created_at"/>
|
||||||
<result property="updatedAt" column="updated_at" />
|
<result property="updatedAt" column="updated_at"/>
|
||||||
<result property="deletedAt" column="deleted_at" />
|
<result property="deletedAt" column="deleted_at"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap type="OrderApple" id="OrderAppleResult">
|
||||||
|
<result property="created_at" column="deleted_at"/>
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="is_comment" column="is_comment"/>
|
||||||
|
<result property="make_hour" column="make_hour"/>
|
||||||
|
<result property="make_time" column="make_time"/>
|
||||||
|
<result property="name" column="name"/>
|
||||||
|
<result property="num" column="num"/>
|
||||||
|
<result property="order_id" column="order_id"/>
|
||||||
|
<result property="product_id" column="product_id"/>
|
||||||
|
<result property="sku" column="sku"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="total_price" column="total_price"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="uid" column="uid"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<sql id="selectOrderVo">
|
<sql id="selectOrderVo">
|
||||||
select id, type, main_order_id, order_id, transaction_id, create_type, create_phone, uid, product_id, name, phone, address, make_time, make_hour, num, total_price, good_price, service_price, pay_price, coupon_id, deduction, pay_time, status, is_pause, mark, address_id, sku, worker_id, first_worker_id, receive_time, is_comment, receive_type, is_accept, middle_phone, user_phone, worker_phone, address_en, uid_admin, address_admin, log_status, log_json, json_status, log_images, created_at, updated_at, deleted_at from order_data
|
select id,
|
||||||
|
type,
|
||||||
|
main_order_id,
|
||||||
|
order_id,
|
||||||
|
transaction_id,
|
||||||
|
create_type,
|
||||||
|
create_phone,
|
||||||
|
uid,
|
||||||
|
product_id,
|
||||||
|
name,
|
||||||
|
phone,
|
||||||
|
address,
|
||||||
|
make_time,
|
||||||
|
make_hour,
|
||||||
|
num,
|
||||||
|
total_price,
|
||||||
|
good_price,
|
||||||
|
service_price,
|
||||||
|
pay_price,
|
||||||
|
coupon_id,
|
||||||
|
deduction,
|
||||||
|
pay_time,
|
||||||
|
status,
|
||||||
|
is_pause,
|
||||||
|
mark,
|
||||||
|
address_id,
|
||||||
|
sku,
|
||||||
|
worker_id,
|
||||||
|
first_worker_id,
|
||||||
|
receive_time,
|
||||||
|
is_comment,
|
||||||
|
receive_type,
|
||||||
|
is_accept,
|
||||||
|
middle_phone,
|
||||||
|
user_phone,
|
||||||
|
worker_phone,
|
||||||
|
address_en,
|
||||||
|
uid_admin,
|
||||||
|
address_admin,
|
||||||
|
log_status,
|
||||||
|
log_json,
|
||||||
|
json_status,
|
||||||
|
log_images,
|
||||||
|
created_at,
|
||||||
|
updated_at,
|
||||||
|
deleted_at
|
||||||
|
from order_data
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectOrderAppleList" parameterType="OrderApple" resultMap="OrderAppleResult">
|
||||||
|
<include refid="selectOrderVo"/>
|
||||||
|
<where>
|
||||||
|
|
||||||
|
<if test="uid != null">
|
||||||
|
and uid = #{uid}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
and type = #{type}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
</where>
|
||||||
|
order by id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectOrderList" parameterType="Order" resultMap="OrderResult">
|
<select id="selectOrderList" parameterType="Order" resultMap="OrderResult">
|
||||||
<include refid="selectOrderVo"/>
|
<include refid="selectOrderVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
|
@ -73,14 +160,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and created_at BETWEEN #{startdate} AND #{enddate}
|
and created_at BETWEEN #{startdate} AND #{enddate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="orderId != null and orderId != ''"> and order_id like concat('%',#{orderId},'%')</if>
|
<if test="orderId != null and orderId != ''">
|
||||||
<if test="transactionId != null and transactionId != ''"> and transaction_id like concat('%',#{transactionId},'%')</if>
|
and order_id like concat('%', #{orderId}, '%')
|
||||||
<if test="createPhone != null and createPhone != ''"> and create_phone like concat('%',#{createPhone},'%')</if>
|
</if>
|
||||||
<if test="uid != null "> and uid = #{uid}</if>
|
<if test="transactionId != null and transactionId != ''">
|
||||||
<if test="status != null "> and status = #{status}</if>
|
and transaction_id like concat('%', #{transactionId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="createPhone != null and createPhone != ''">
|
||||||
|
and create_phone like concat('%', #{createPhone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="uid != null">
|
||||||
|
and uid = #{uid}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="productId != null "> and product_id = #{productId}</if>
|
<if test="productId != null">
|
||||||
<if test="workerId != null "> and worker_id = #{workerId}</if>
|
and product_id = #{productId}
|
||||||
|
</if>
|
||||||
|
<if test="workerId != null">
|
||||||
|
and worker_id = #{workerId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -99,161 +200,419 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertOrder" parameterType="Order" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertOrder" parameterType="Order" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into order_data
|
insert into order_data
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="type != null">type,</if>
|
<if test="type != null">
|
||||||
<if test="mainOrderId != null">main_order_id,</if>
|
type,
|
||||||
<if test="orderId != null and orderId != ''">order_id,</if>
|
</if>
|
||||||
<if test="transactionId != null">transaction_id,</if>
|
<if test="mainOrderId != null">
|
||||||
<if test="createType != null">create_type,</if>
|
main_order_id,
|
||||||
<if test="createPhone != null">create_phone,</if>
|
</if>
|
||||||
<if test="uid != null">uid,</if>
|
<if test="orderId != null and orderId != ''">
|
||||||
<if test="productId != null">product_id,</if>
|
order_id,
|
||||||
<if test="name != null and name != ''">name,</if>
|
</if>
|
||||||
<if test="phone != null and phone != ''">phone,</if>
|
<if test="transactionId != null">
|
||||||
<if test="address != null and address != ''">address,</if>
|
transaction_id,
|
||||||
<if test="makeTime != null">make_time,</if>
|
</if>
|
||||||
<if test="makeHour != null">make_hour,</if>
|
<if test="createType != null">
|
||||||
<if test="num != null">num,</if>
|
create_type,
|
||||||
<if test="totalPrice != null">total_price,</if>
|
</if>
|
||||||
<if test="goodPrice != null">good_price,</if>
|
<if test="createPhone != null">
|
||||||
<if test="servicePrice != null">service_price,</if>
|
create_phone,
|
||||||
<if test="payPrice != null">pay_price,</if>
|
</if>
|
||||||
<if test="couponId != null">coupon_id,</if>
|
<if test="uid != null">
|
||||||
<if test="deduction != null">deduction,</if>
|
uid,
|
||||||
<if test="payTime != null">pay_time,</if>
|
</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="productId != null">
|
||||||
<if test="isPause != null">is_pause,</if>
|
product_id,
|
||||||
<if test="mark != null">mark,</if>
|
</if>
|
||||||
<if test="addressId != null">address_id,</if>
|
<if test="name != null and name != ''">
|
||||||
<if test="sku != null">sku,</if>
|
name,
|
||||||
<if test="workerId != null">worker_id,</if>
|
</if>
|
||||||
<if test="firstWorkerId != null">first_worker_id,</if>
|
<if test="phone != null and phone != ''">
|
||||||
<if test="receiveTime != null">receive_time,</if>
|
phone,
|
||||||
<if test="isComment != null">is_comment,</if>
|
</if>
|
||||||
<if test="receiveType != null">receive_type,</if>
|
<if test="address != null and address != ''">
|
||||||
<if test="isAccept != null">is_accept,</if>
|
address,
|
||||||
<if test="middlePhone != null">middle_phone,</if>
|
</if>
|
||||||
<if test="userPhone != null">user_phone,</if>
|
<if test="makeTime != null">
|
||||||
<if test="workerPhone != null">worker_phone,</if>
|
make_time,
|
||||||
<if test="addressEn != null">address_en,</if>
|
</if>
|
||||||
<if test="uidAdmin != null">uid_admin,</if>
|
<if test="makeHour != null">
|
||||||
<if test="addressAdmin != null">address_admin,</if>
|
make_hour,
|
||||||
<if test="logStatus != null">log_status,</if>
|
</if>
|
||||||
<if test="logJson != null">log_json,</if>
|
<if test="num != null">
|
||||||
<if test="jsonStatus != null">json_status,</if>
|
num,
|
||||||
<if test="logImages != null">log_images,</if>
|
</if>
|
||||||
<if test="deletedAt != null">deleted_at,</if>
|
<if test="totalPrice != null">
|
||||||
|
total_price,
|
||||||
|
</if>
|
||||||
|
<if test="goodPrice != null">
|
||||||
|
good_price,
|
||||||
|
</if>
|
||||||
|
<if test="servicePrice != null">
|
||||||
|
service_price,
|
||||||
|
</if>
|
||||||
|
<if test="payPrice != null">
|
||||||
|
pay_price,
|
||||||
|
</if>
|
||||||
|
<if test="couponId != null">
|
||||||
|
coupon_id,
|
||||||
|
</if>
|
||||||
|
<if test="deduction != null">
|
||||||
|
deduction,
|
||||||
|
</if>
|
||||||
|
<if test="payTime != null">
|
||||||
|
pay_time,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status,
|
||||||
|
</if>
|
||||||
|
<if test="isPause != null">
|
||||||
|
is_pause,
|
||||||
|
</if>
|
||||||
|
<if test="mark != null">
|
||||||
|
mark,
|
||||||
|
</if>
|
||||||
|
<if test="addressId != null">
|
||||||
|
address_id,
|
||||||
|
</if>
|
||||||
|
<if test="sku != null">
|
||||||
|
sku,
|
||||||
|
</if>
|
||||||
|
<if test="workerId != null">
|
||||||
|
worker_id,
|
||||||
|
</if>
|
||||||
|
<if test="firstWorkerId != null">
|
||||||
|
first_worker_id,
|
||||||
|
</if>
|
||||||
|
<if test="receiveTime != null">
|
||||||
|
receive_time,
|
||||||
|
</if>
|
||||||
|
<if test="isComment != null">
|
||||||
|
is_comment,
|
||||||
|
</if>
|
||||||
|
<if test="receiveType != null">
|
||||||
|
receive_type,
|
||||||
|
</if>
|
||||||
|
<if test="isAccept != null">
|
||||||
|
is_accept,
|
||||||
|
</if>
|
||||||
|
<if test="middlePhone != null">
|
||||||
|
middle_phone,
|
||||||
|
</if>
|
||||||
|
<if test="userPhone != null">
|
||||||
|
user_phone,
|
||||||
|
</if>
|
||||||
|
<if test="workerPhone != null">
|
||||||
|
worker_phone,
|
||||||
|
</if>
|
||||||
|
<if test="addressEn != null">
|
||||||
|
address_en,
|
||||||
|
</if>
|
||||||
|
<if test="uidAdmin != null">
|
||||||
|
uid_admin,
|
||||||
|
</if>
|
||||||
|
<if test="addressAdmin != null">
|
||||||
|
address_admin,
|
||||||
|
</if>
|
||||||
|
<if test="logStatus != null">
|
||||||
|
log_status,
|
||||||
|
</if>
|
||||||
|
<if test="logJson != null">
|
||||||
|
log_json,
|
||||||
|
</if>
|
||||||
|
<if test="jsonStatus != null">
|
||||||
|
json_status,
|
||||||
|
</if>
|
||||||
|
<if test="logImages != null">
|
||||||
|
log_images,
|
||||||
|
</if>
|
||||||
|
<if test="deletedAt != null">
|
||||||
|
deleted_at,
|
||||||
|
</if>
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="type != null">#{type},</if>
|
<if test="type != null">
|
||||||
<if test="mainOrderId != null">#{mainOrderId},</if>
|
#{type},
|
||||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
</if>
|
||||||
<if test="transactionId != null">#{transactionId},</if>
|
<if test="mainOrderId != null">
|
||||||
<if test="createType != null">#{createType},</if>
|
#{mainOrderId},
|
||||||
<if test="createPhone != null">#{createPhone},</if>
|
</if>
|
||||||
<if test="uid != null">#{uid},</if>
|
<if test="orderId != null and orderId != ''">
|
||||||
<if test="productId != null">#{productId},</if>
|
#{orderId},
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
</if>
|
||||||
<if test="phone != null and phone != ''">#{phone},</if>
|
<if test="transactionId != null">
|
||||||
<if test="address != null and address != ''">#{address},</if>
|
#{transactionId},
|
||||||
<if test="makeTime != null">#{makeTime},</if>
|
</if>
|
||||||
<if test="makeHour != null">#{makeHour},</if>
|
<if test="createType != null">
|
||||||
<if test="num != null">#{num},</if>
|
#{createType},
|
||||||
<if test="totalPrice != null">#{totalPrice},</if>
|
</if>
|
||||||
<if test="goodPrice != null">#{goodPrice},</if>
|
<if test="createPhone != null">
|
||||||
<if test="servicePrice != null">#{servicePrice},</if>
|
#{createPhone},
|
||||||
<if test="payPrice != null">#{payPrice},</if>
|
</if>
|
||||||
<if test="couponId != null">#{couponId},</if>
|
<if test="uid != null">
|
||||||
<if test="deduction != null">#{deduction},</if>
|
#{uid},
|
||||||
<if test="payTime != null">#{payTime},</if>
|
</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="productId != null">
|
||||||
<if test="isPause != null">#{isPause},</if>
|
#{productId},
|
||||||
<if test="mark != null">#{mark},</if>
|
</if>
|
||||||
<if test="addressId != null">#{addressId},</if>
|
<if test="name != null and name != ''">
|
||||||
<if test="sku != null">#{sku},</if>
|
#{name},
|
||||||
<if test="workerId != null">#{workerId},</if>
|
</if>
|
||||||
<if test="firstWorkerId != null">#{firstWorkerId},</if>
|
<if test="phone != null and phone != ''">
|
||||||
<if test="receiveTime != null">#{receiveTime},</if>
|
#{phone},
|
||||||
<if test="isComment != null">#{isComment},</if>
|
</if>
|
||||||
<if test="receiveType != null">#{receiveType},</if>
|
<if test="address != null and address != ''">
|
||||||
<if test="isAccept != null">#{isAccept},</if>
|
#{address},
|
||||||
<if test="middlePhone != null">#{middlePhone},</if>
|
</if>
|
||||||
<if test="userPhone != null">#{userPhone},</if>
|
<if test="makeTime != null">
|
||||||
<if test="workerPhone != null">#{workerPhone},</if>
|
#{makeTime},
|
||||||
<if test="addressEn != null">#{addressEn},</if>
|
</if>
|
||||||
<if test="uidAdmin != null">#{uidAdmin},</if>
|
<if test="makeHour != null">
|
||||||
<if test="addressAdmin != null">#{addressAdmin},</if>
|
#{makeHour},
|
||||||
<if test="logStatus != null">#{logStatus},</if>
|
</if>
|
||||||
<if test="logJson != null">#{logJson},</if>
|
<if test="num != null">
|
||||||
<if test="jsonStatus != null">#{jsonStatus},</if>
|
#{num},
|
||||||
<if test="logImages != null">#{logImages},</if>
|
</if>
|
||||||
<if test="deletedAt != null">#{deletedAt},</if>
|
<if test="totalPrice != null">
|
||||||
|
#{totalPrice},
|
||||||
|
</if>
|
||||||
|
<if test="goodPrice != null">
|
||||||
|
#{goodPrice},
|
||||||
|
</if>
|
||||||
|
<if test="servicePrice != null">
|
||||||
|
#{servicePrice},
|
||||||
|
</if>
|
||||||
|
<if test="payPrice != null">
|
||||||
|
#{payPrice},
|
||||||
|
</if>
|
||||||
|
<if test="couponId != null">
|
||||||
|
#{couponId},
|
||||||
|
</if>
|
||||||
|
<if test="deduction != null">
|
||||||
|
#{deduction},
|
||||||
|
</if>
|
||||||
|
<if test="payTime != null">
|
||||||
|
#{payTime},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status},
|
||||||
|
</if>
|
||||||
|
<if test="isPause != null">
|
||||||
|
#{isPause},
|
||||||
|
</if>
|
||||||
|
<if test="mark != null">
|
||||||
|
#{mark},
|
||||||
|
</if>
|
||||||
|
<if test="addressId != null">
|
||||||
|
#{addressId},
|
||||||
|
</if>
|
||||||
|
<if test="sku != null">
|
||||||
|
#{sku},
|
||||||
|
</if>
|
||||||
|
<if test="workerId != null">
|
||||||
|
#{workerId},
|
||||||
|
</if>
|
||||||
|
<if test="firstWorkerId != null">
|
||||||
|
#{firstWorkerId},
|
||||||
|
</if>
|
||||||
|
<if test="receiveTime != null">
|
||||||
|
#{receiveTime},
|
||||||
|
</if>
|
||||||
|
<if test="isComment != null">
|
||||||
|
#{isComment},
|
||||||
|
</if>
|
||||||
|
<if test="receiveType != null">
|
||||||
|
#{receiveType},
|
||||||
|
</if>
|
||||||
|
<if test="isAccept != null">
|
||||||
|
#{isAccept},
|
||||||
|
</if>
|
||||||
|
<if test="middlePhone != null">
|
||||||
|
#{middlePhone},
|
||||||
|
</if>
|
||||||
|
<if test="userPhone != null">
|
||||||
|
#{userPhone},
|
||||||
|
</if>
|
||||||
|
<if test="workerPhone != null">
|
||||||
|
#{workerPhone},
|
||||||
|
</if>
|
||||||
|
<if test="addressEn != null">
|
||||||
|
#{addressEn},
|
||||||
|
</if>
|
||||||
|
<if test="uidAdmin != null">
|
||||||
|
#{uidAdmin},
|
||||||
|
</if>
|
||||||
|
<if test="addressAdmin != null">
|
||||||
|
#{addressAdmin},
|
||||||
|
</if>
|
||||||
|
<if test="logStatus != null">
|
||||||
|
#{logStatus},
|
||||||
|
</if>
|
||||||
|
<if test="logJson != null">
|
||||||
|
#{logJson},
|
||||||
|
</if>
|
||||||
|
<if test="jsonStatus != null">
|
||||||
|
#{jsonStatus},
|
||||||
|
</if>
|
||||||
|
<if test="logImages != null">
|
||||||
|
#{logImages},
|
||||||
|
</if>
|
||||||
|
<if test="deletedAt != null">
|
||||||
|
#{deletedAt},
|
||||||
|
</if>
|
||||||
NOW(),
|
NOW(),
|
||||||
NOW()
|
NOW()
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateOrder" parameterType="Order">
|
<update id="updateOrder" parameterType="Order">
|
||||||
update order_data
|
update order_data
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="type != null">type = #{type},</if>
|
<if test="type != null">
|
||||||
<if test="mainOrderId != null">main_order_id = #{mainOrderId},</if>
|
type = #{type},
|
||||||
<if test="orderId != null and orderId != ''">order_id = #{orderId},</if>
|
</if>
|
||||||
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
<if test="mainOrderId != null">
|
||||||
<if test="createType != null">create_type = #{createType},</if>
|
main_order_id = #{mainOrderId},
|
||||||
<if test="createPhone != null">create_phone = #{createPhone},</if>
|
</if>
|
||||||
<if test="uid != null">uid = #{uid},</if>
|
<if test="orderId != null and orderId != ''">
|
||||||
<if test="productId != null">product_id = #{productId},</if>
|
order_id = #{orderId},
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
</if>
|
||||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
<if test="transactionId != null">
|
||||||
<if test="address != null and address != ''">address = #{address},</if>
|
transaction_id = #{transactionId},
|
||||||
<if test="makeTime != null">make_time = #{makeTime},</if>
|
</if>
|
||||||
<if test="makeHour != null">make_hour = #{makeHour},</if>
|
<if test="createType != null">
|
||||||
<if test="num != null">num = #{num},</if>
|
create_type = #{createType},
|
||||||
<if test="totalPrice != null">total_price = #{totalPrice},</if>
|
</if>
|
||||||
<if test="goodPrice != null">good_price = #{goodPrice},</if>
|
<if test="createPhone != null">
|
||||||
<if test="servicePrice != null">service_price = #{servicePrice},</if>
|
create_phone = #{createPhone},
|
||||||
<if test="payPrice != null">pay_price = #{payPrice},</if>
|
</if>
|
||||||
<if test="couponId != null">coupon_id = #{couponId},</if>
|
<if test="uid != null">
|
||||||
<if test="deduction != null">deduction = #{deduction},</if>
|
uid = #{uid},
|
||||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="productId != null">
|
||||||
<if test="isPause != null">is_pause = #{isPause},</if>
|
product_id = #{productId},
|
||||||
<if test="mark != null">mark = #{mark},</if>
|
</if>
|
||||||
<if test="addressId != null">address_id = #{addressId},</if>
|
<if test="name != null and name != ''">
|
||||||
<if test="sku != null">sku = #{sku},</if>
|
name = #{name},
|
||||||
<if test="workerId != null">worker_id = #{workerId},</if>
|
</if>
|
||||||
<if test="firstWorkerId != null">first_worker_id = #{firstWorkerId},</if>
|
<if test="phone != null and phone != ''">
|
||||||
<if test="receiveTime != null">receive_time = #{receiveTime},</if>
|
phone = #{phone},
|
||||||
<if test="isComment != null">is_comment = #{isComment},</if>
|
</if>
|
||||||
<if test="receiveType != null">receive_type = #{receiveType},</if>
|
<if test="address != null and address != ''">
|
||||||
<if test="isAccept != null">is_accept = #{isAccept},</if>
|
address = #{address},
|
||||||
<if test="middlePhone != null">middle_phone = #{middlePhone},</if>
|
</if>
|
||||||
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
<if test="makeTime != null">
|
||||||
<if test="workerPhone != null">worker_phone = #{workerPhone},</if>
|
make_time = #{makeTime},
|
||||||
<if test="addressEn != null">address_en = #{addressEn},</if>
|
</if>
|
||||||
<if test="uidAdmin != null">uid_admin = #{uidAdmin},</if>
|
<if test="makeHour != null">
|
||||||
<if test="addressAdmin != null">address_admin = #{addressAdmin},</if>
|
make_hour = #{makeHour},
|
||||||
<if test="logStatus != null">log_status = #{logStatus},</if>
|
</if>
|
||||||
<if test="logJson != null">log_json = #{logJson},</if>
|
<if test="num != null">
|
||||||
<if test="jsonStatus != null">json_status = #{jsonStatus},</if>
|
num = #{num},
|
||||||
<if test="logImages != null">log_images = #{logImages},</if>
|
</if>
|
||||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
<if test="totalPrice != null">
|
||||||
|
total_price = #{totalPrice},
|
||||||
|
</if>
|
||||||
|
<if test="goodPrice != null">
|
||||||
|
good_price = #{goodPrice},
|
||||||
|
</if>
|
||||||
|
<if test="servicePrice != null">
|
||||||
|
service_price = #{servicePrice},
|
||||||
|
</if>
|
||||||
|
<if test="payPrice != null">
|
||||||
|
pay_price = #{payPrice},
|
||||||
|
</if>
|
||||||
|
<if test="couponId != null">
|
||||||
|
coupon_id = #{couponId},
|
||||||
|
</if>
|
||||||
|
<if test="deduction != null">
|
||||||
|
deduction = #{deduction},
|
||||||
|
</if>
|
||||||
|
<if test="payTime != null">
|
||||||
|
pay_time = #{payTime},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status = #{status},
|
||||||
|
</if>
|
||||||
|
<if test="isPause != null">
|
||||||
|
is_pause = #{isPause},
|
||||||
|
</if>
|
||||||
|
<if test="mark != null">
|
||||||
|
mark = #{mark},
|
||||||
|
</if>
|
||||||
|
<if test="addressId != null">
|
||||||
|
address_id = #{addressId},
|
||||||
|
</if>
|
||||||
|
<if test="sku != null">
|
||||||
|
sku = #{sku},
|
||||||
|
</if>
|
||||||
|
<if test="workerId != null">
|
||||||
|
worker_id = #{workerId},
|
||||||
|
</if>
|
||||||
|
<if test="firstWorkerId != null">
|
||||||
|
first_worker_id = #{firstWorkerId},
|
||||||
|
</if>
|
||||||
|
<if test="receiveTime != null">
|
||||||
|
receive_time = #{receiveTime},
|
||||||
|
</if>
|
||||||
|
<if test="isComment != null">
|
||||||
|
is_comment = #{isComment},
|
||||||
|
</if>
|
||||||
|
<if test="receiveType != null">
|
||||||
|
receive_type = #{receiveType},
|
||||||
|
</if>
|
||||||
|
<if test="isAccept != null">
|
||||||
|
is_accept = #{isAccept},
|
||||||
|
</if>
|
||||||
|
<if test="middlePhone != null">
|
||||||
|
middle_phone = #{middlePhone},
|
||||||
|
</if>
|
||||||
|
<if test="userPhone != null">
|
||||||
|
user_phone = #{userPhone},
|
||||||
|
</if>
|
||||||
|
<if test="workerPhone != null">
|
||||||
|
worker_phone = #{workerPhone},
|
||||||
|
</if>
|
||||||
|
<if test="addressEn != null">
|
||||||
|
address_en = #{addressEn},
|
||||||
|
</if>
|
||||||
|
<if test="uidAdmin != null">
|
||||||
|
uid_admin = #{uidAdmin},
|
||||||
|
</if>
|
||||||
|
<if test="addressAdmin != null">
|
||||||
|
address_admin = #{addressAdmin},
|
||||||
|
</if>
|
||||||
|
<if test="logStatus != null">
|
||||||
|
log_status = #{logStatus},
|
||||||
|
</if>
|
||||||
|
<if test="logJson != null">
|
||||||
|
log_json = #{logJson},
|
||||||
|
</if>
|
||||||
|
<if test="jsonStatus != null">
|
||||||
|
json_status = #{jsonStatus},
|
||||||
|
</if>
|
||||||
|
<if test="logImages != null">
|
||||||
|
log_images = #{logImages},
|
||||||
|
</if>
|
||||||
|
<if test="deletedAt != null">
|
||||||
|
deleted_at = #{deletedAt},
|
||||||
|
</if>
|
||||||
updated_at = NOW()
|
updated_at = NOW()
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteOrderById" parameterType="Long">
|
<delete id="deleteOrderById" parameterType="Long">
|
||||||
delete from order_data where id = #{id}
|
delete
|
||||||
|
from order_data
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteOrderByIds" parameterType="String">
|
<delete id="deleteOrderByIds" parameterType="String">
|
||||||
delete from order_data where id in
|
delete
|
||||||
|
from order_data where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<update id="updateUserAddressDefault" parameterType="Long">
|
<update id="updateUserAddressDefault" parameterType="Long">
|
||||||
update user_address
|
update user_address
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
is_default =0
|
is_default =0,
|
||||||
updated_at=NOW()
|
updated_at=NOW()
|
||||||
</trim>
|
</trim>
|
||||||
where uid = #{uid}
|
where uid = #{uid}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue