Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
370fe409f6
|
|
@ -71,4 +71,5 @@ public interface CacheKey {
|
|||
* 商品库存
|
||||
*/
|
||||
String PRODUCT = "PRODUCT:";
|
||||
String SONG_URL = "song:";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||
import cn.ysk.cashier.dto.shop.TbShopSongOrderQueryCriteria;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.utils.CacheKey;
|
||||
import cn.ysk.cashier.utils.RedisUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopSongOrder;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopSongOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* (TbShopSongOrder)表控制层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-07-08 09:24:23
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "歌曲订单管理")
|
||||
@RequestMapping("/api/tbShopSongOrder")
|
||||
public class TbShopSongOrderController{
|
||||
private final RedisUtils redisUtils;
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbShopSongOrderService tbShopSongOrderService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
* @param tbShopSongOrder 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation("获取歌曲列表 分页")
|
||||
@AnonymousGetMapping
|
||||
public ResponseEntity<Object> selectAll(TbShopSongOrderQueryCriteria tbShopSongOrder) {
|
||||
String code = "";
|
||||
if(redisUtils.hasKey(CacheKey.SONG_URL + tbShopSongOrder.getShopId())){
|
||||
code = (String) redisUtils.get(CacheKey.SONG_URL + tbShopSongOrder.getShopId());
|
||||
}
|
||||
Map<String, Object> stringObjectMap = tbShopSongOrderService.queryAll(tbShopSongOrder);
|
||||
stringObjectMap.put("songUrl",code);
|
||||
return new ResponseEntity<>(stringObjectMap, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("createUrl")
|
||||
@ApiOperation("更新歌手页地址")
|
||||
@AnonymousPostMapping
|
||||
public ResponseEntity<Object> createUrl(String shopId) {
|
||||
String key = RandomStringUtils.randomAlphanumeric(8);
|
||||
redisUtils.set(CacheKey.SONG_URL + shopId, key);
|
||||
redisUtils.set(CacheKey.SONG_URL + key, shopId);
|
||||
return new ResponseEntity<>(key,HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("订单详情")
|
||||
public ResponseEntity<Object> selectOne(@PathVariable Serializable id) {
|
||||
return new ResponseEntity<>(tbShopSongOrderService.getById(id),HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 歌手页 歌曲列表
|
||||
* @param key 有效key
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping("songs")
|
||||
@AnonymousGetMapping
|
||||
public ResponseEntity<Object> singerSongs(String key) {
|
||||
String shopId="";
|
||||
if (redisUtils.hasKey(CacheKey.SONG_URL + key)) {
|
||||
shopId = (String)redisUtils.get(CacheKey.SONG_URL + key);
|
||||
}else {
|
||||
throw new BadRequestException("地址已失效,请重新获取地址。");
|
||||
}
|
||||
return new ResponseEntity<>(tbShopSongOrderService.singerSongs(Integer.valueOf(shopId)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下一首
|
||||
* @param shopId 店铺Id
|
||||
*/
|
||||
@PostMapping("next")
|
||||
@AnonymousPostMapping
|
||||
public ResponseEntity<Object> next(@RequestBody Integer shopId) {
|
||||
tbShopSongOrderService.next(shopId);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package cn.ysk.cashier.dto.shop;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@Data
|
||||
public class TbShopSongOrderQueryCriteria {
|
||||
|
||||
private String shopId;
|
||||
private String orderNo;
|
||||
private String name;
|
||||
private Integer state;
|
||||
/**
|
||||
* 从1开始
|
||||
*/
|
||||
private Long page = 1L;
|
||||
/**
|
||||
* 展示数量
|
||||
*/
|
||||
private Long size = 10L;
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
if (StringUtils.isNotBlank(shopId) && !shopId.equals("1")) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
if (StringUtils.isNotBlank(orderNo))
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
if (StringUtils.isNotBlank(name))
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
if (state!=null)
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (TbShopSongOrder)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-07-08 09:24:27
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TbShopSongOrder extends Model<TbShopSongOrder> {
|
||||
|
||||
private Integer id;
|
||||
//歌曲id
|
||||
private Integer songId;
|
||||
private Integer shopId;
|
||||
//歌曲名称
|
||||
private String songName;
|
||||
//用户id
|
||||
private Integer userId;
|
||||
//支付金额
|
||||
private Double payMoney;
|
||||
//状态 -1 未支付 0 已取消 1 已支付 2 演唱中 3 已演唱
|
||||
private Integer state;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//下单来源
|
||||
private Integer clientType;
|
||||
//订单编号
|
||||
private String orderNo;
|
||||
//点歌人
|
||||
private String fromName;
|
||||
//收歌人
|
||||
private String toName;
|
||||
//祝福语
|
||||
private String note;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getSongId() {
|
||||
return songId;
|
||||
}
|
||||
|
||||
public void setSongId(Integer songId) {
|
||||
this.songId = songId;
|
||||
}
|
||||
|
||||
public String getSongName() {
|
||||
return songName;
|
||||
}
|
||||
|
||||
public void setSongName(String songName) {
|
||||
this.songName = songName;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Double getPayMoney() {
|
||||
return payMoney;
|
||||
}
|
||||
|
||||
public void setPayMoney(Double payMoney) {
|
||||
this.payMoney = payMoney;
|
||||
}
|
||||
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Integer getClientType() {
|
||||
return clientType;
|
||||
}
|
||||
|
||||
public void setClientType(Integer clientType) {
|
||||
this.clientType = clientType;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getFromName() {
|
||||
return fromName;
|
||||
}
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName;
|
||||
}
|
||||
|
||||
public String getToName() {
|
||||
return toName;
|
||||
}
|
||||
|
||||
public void setToName(String toName) {
|
||||
this.toName = toName;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopSongOrder;
|
||||
import cn.ysk.cashier.mybatis.vo.SingerSongVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (TbShopSongOrder)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-07-08 09:24:26
|
||||
*/
|
||||
public interface TbShopSongOrderMapper extends BaseMapper<TbShopSongOrder> {
|
||||
|
||||
|
||||
@Select("select " +
|
||||
"song.img,song.name as songName,song.origin_singer as originSinger,orders.from_name as fromName," +
|
||||
"orders.to_name as toName,orders.note " +
|
||||
"from tb_shop_song_order orders " +
|
||||
"left join tb_shop_song song on orders.song_id=song.id " +
|
||||
"where state = #{state} and orders.shop_id=#{shopId} order by orders.create_time limit 12")
|
||||
List<SingerSongVo> findByState(@Param("state") Integer state, @Param("shopId") Integer shopId);
|
||||
|
||||
|
||||
@Update("update tb_shop_song_order set state=3 where state=2 and shop_id=#{shopId}")
|
||||
int upState(@Param("shopId") Integer shopId);
|
||||
|
||||
@Update("update tb_shop_song_order " +
|
||||
"set state = 2 " +
|
||||
"where id = (" +
|
||||
" select id " +
|
||||
" from (" +
|
||||
" select id " +
|
||||
" from tb_shop_song_order " +
|
||||
" where state = 1 and shop_id = #{shopId}" +
|
||||
" order by create_time " +
|
||||
" limit 1" +
|
||||
" ) as subquery" +
|
||||
")")
|
||||
int setDuringSinging(@Param("shopId") Integer shopId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package cn.ysk.cashier.mybatis.service;
|
||||
|
||||
import cn.ysk.cashier.dto.shop.TbShopSongOrderQueryCriteria;
|
||||
import cn.ysk.cashier.dto.shop.TbShopSongQueryCriteria;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopSongOrder;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* (TbShopSongOrder)表服务接口
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-07-08 09:24:27
|
||||
*/
|
||||
public interface TbShopSongOrderService extends IService<TbShopSongOrder> {
|
||||
|
||||
Map<String,Object> queryAll(TbShopSongOrderQueryCriteria criteria);
|
||||
|
||||
Map<String,Object> singerSongs(Integer shopId);
|
||||
|
||||
void next(Integer shopId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package cn.ysk.cashier.mybatis.service.impl;
|
||||
|
||||
import cn.ysk.cashier.dto.shop.TbShopSongOrderQueryCriteria;
|
||||
import cn.ysk.cashier.dto.shop.TbShopSongQueryCriteria;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopSong;
|
||||
import cn.ysk.cashier.mybatis.mapper.TbShopSongMapper;
|
||||
import cn.ysk.cashier.mybatis.vo.SingerSongVo;
|
||||
import cn.ysk.cashier.utils.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.ysk.cashier.mybatis.mapper.TbShopSongOrderMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopSongOrder;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopSongOrderService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* (TbShopSongOrder)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-07-08 09:24:27
|
||||
*/
|
||||
@Service("tbShopSongOrderService")
|
||||
public class TbShopSongOrderServiceImpl extends ServiceImpl<TbShopSongOrderMapper, TbShopSongOrder> implements TbShopSongOrderService {
|
||||
|
||||
@Autowired
|
||||
private TbShopSongOrderMapper tbShopSongOrderMapper;
|
||||
@Override
|
||||
public Map<String, Object> queryAll(TbShopSongOrderQueryCriteria criteria) {
|
||||
Page<TbShopSongOrder> page = new Page<>(
|
||||
criteria.getPage(),
|
||||
criteria.getSize());
|
||||
QueryWrapper<TbShopSongOrder> wrapper = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(criteria.getShopId())) {
|
||||
wrapper.eq("shop_id", criteria.getShopId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(criteria.getOrderNo())) {
|
||||
wrapper.eq("order_no", criteria.getOrderNo());
|
||||
}
|
||||
if (criteria.getState() != null) {
|
||||
wrapper.eq("state", criteria.getState());
|
||||
}
|
||||
if (StringUtils.isNotBlank(criteria.getName())) {
|
||||
wrapper.like("song_name", criteria.getName());
|
||||
}
|
||||
wrapper.orderByDesc("create_time");
|
||||
Page<TbShopSongOrder> tbShopSongPage = tbShopSongOrderMapper.selectPage(page, wrapper);
|
||||
return PageUtil.toPage(tbShopSongPage.getRecords(), tbShopSongPage.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> singerSongs(Integer shopId) {
|
||||
Map<String,Object> map = new LinkedHashMap<>(3);
|
||||
map.put("shopId",shopId);
|
||||
List<SingerSongVo> byState = tbShopSongOrderMapper.findByState(2, shopId);
|
||||
if(CollectionUtils.isEmpty(byState)){
|
||||
map.put("afoot","");//演唱中
|
||||
}else {
|
||||
map.put("afoot",byState.get(0));//演唱中
|
||||
}
|
||||
map.put("Waiting",tbShopSongOrderMapper.findByState(1,shopId));
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void next(Integer shopId) {
|
||||
tbShopSongOrderMapper.upState(shopId);
|
||||
tbShopSongOrderMapper.setDuringSinging(shopId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package cn.ysk.cashier.mybatis.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SingerSongVo {
|
||||
private String img;
|
||||
private String songName;
|
||||
private String originSinger;
|
||||
private String fromName;
|
||||
private String toName;
|
||||
private String note;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?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="cn.ysk.cashier.mybatis.mapper.TbShopSongOrderMapper">
|
||||
|
||||
<resultMap type="cn.ysk.cashier.mybatis.entity.TbShopSongOrder" id="TbShopSongOrderMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="songId" column="song_id" jdbcType="INTEGER"/>
|
||||
<result property="songName" column="song_name" jdbcType="VARCHAR"/>
|
||||
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||
<result property="payMoney" column="pay_money" jdbcType="NUMERIC"/>
|
||||
<result property="state" column="state" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="clientType" column="client_type" jdbcType="INTEGER"/>
|
||||
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
|
||||
<result property="fromName" column="from_name" jdbcType="VARCHAR"/>
|
||||
<result property="toName" column="to_name" jdbcType="VARCHAR"/>
|
||||
<result property="note" column="note" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, song_id, song_name, user_id, pay_money, state, create_time, client_type, order_no, from_name, to_name, note </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbShopSongOrderMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_song_order
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbShopSongOrderMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_song_order
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="songId != null">
|
||||
and song_id = #{songId}
|
||||
</if>
|
||||
<if test="songName != null and songName != ''">
|
||||
and song_name = #{songName}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="payMoney != null">
|
||||
and pay_money = #{payMoney}
|
||||
</if>
|
||||
<if test="state != null">
|
||||
and state = #{state}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="clientType != null">
|
||||
and client_type = #{clientType}
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="fromName != null and fromName != ''">
|
||||
and from_name = #{fromName}
|
||||
</if>
|
||||
<if test="toName != null and toName != ''">
|
||||
and to_name = #{toName}
|
||||
</if>
|
||||
<if test="note != null and note != ''">
|
||||
and note = #{note}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_shop_song_order(song_id, song_name, user_id, pay_money, state, create_time, client_type,
|
||||
order_no, from_name, to_name, note)
|
||||
values (#{songId}, #{songName}, #{userId}, #{payMoney}, #{state}, #{createTime}, #{clientType}, #{orderNo},
|
||||
#{fromName}, #{toName}, #{note})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_shop_song_order(song_id, song_name, user_id, pay_money, state, create_time, client_type,
|
||||
order_no, from_name, to_name, note)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.songId}, #{entity.songName}, #{entity.userId}, #{entity.payMoney}, #{entity.state},
|
||||
#{entity.createTime}, #{entity.clientType}, #{entity.orderNo}, #{entity.fromName}, #{entity.toName},
|
||||
#{entity.note})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update tb_shop_song_order
|
||||
<set>
|
||||
<if test="songId != null">
|
||||
song_id = #{songId},
|
||||
</if>
|
||||
<if test="songName != null and songName != ''">
|
||||
song_name = #{songName},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="payMoney != null">
|
||||
pay_money = #{payMoney},
|
||||
</if>
|
||||
<if test="state != null">
|
||||
state = #{state},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="clientType != null">
|
||||
client_type = #{clientType},
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
order_no = #{orderNo},
|
||||
</if>
|
||||
<if test="fromName != null and fromName != ''">
|
||||
from_name = #{fromName},
|
||||
</if>
|
||||
<if test="toName != null and toName != ''">
|
||||
to_name = #{toName},
|
||||
</if>
|
||||
<if test="note != null and note != ''">
|
||||
note = #{note},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_shop_song_order
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue