Merge branch 'dev2'
# Conflicts: # logs/cloud-market/error.log # logs/cloud-market/info.logdev2
commit
5c4ae48532
|
@ -28,6 +28,8 @@ public class OrdersAddReq {
|
|||
)
|
||||
private String ordersNum;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单产品(产品外键)
|
||||
*/
|
||||
|
|
|
@ -11,13 +11,17 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "修改产品接口请求对象",description = "进行产品接口的修改")
|
||||
public class OrdersUpdReq {
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@Schema(title = "订单主键",
|
||||
type = "Long")
|
||||
private Long ordersId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,6 +39,7 @@ public class OrdersController {
|
|||
@Operation(summary = "查看订单", description = "根据订单名称 编号 状态 查询")
|
||||
public List<Orders> selectList(@Validated @RequestBody OrdersListReq req){
|
||||
List<Orders> info = orderShowService.selectList(req);
|
||||
log.info("查看订单列表,根据订单名称 编号 状态 查询",req,info);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -62,7 +63,9 @@ public class OrdersController {
|
|||
@PutMapping("/updateOrders")
|
||||
@Operation(summary = "修改订单", description = "根据ordersid查找订单进行修改")
|
||||
Result updateOrders(@Validated @RequestBody OrdersUpdReq ordersUpdReq){
|
||||
return orderShowService.updateOrders(ordersUpdReq);
|
||||
Result result = orderShowService.updateOrders(ordersUpdReq);
|
||||
log.info(ordersUpdReq);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,9 +61,9 @@ public class OrderShowServiceImpl implements OrderShowService {
|
|||
public Result updateOrders(OrdersUpdReq ordersUpdReq) {
|
||||
Integer updateorders = orderShowMapper.updateOrders(ordersUpdReq);
|
||||
if(updateorders > 0){
|
||||
return Result.success(ordersUpdReq,"删除订单成功(逻辑)");
|
||||
return Result.success(ordersUpdReq,"修改订单成功");
|
||||
}
|
||||
return Result.error(402,"删除订单失败(逻辑)");
|
||||
return Result.error(402,"修改订单失败");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ public class OrderShowServiceImpl implements OrderShowService {
|
|||
*/
|
||||
@Override
|
||||
public Result updateByExist(Integer ordersId) {
|
||||
Integer updatebyexist = orderShowMapper.updateByeExist(ordersId);
|
||||
Integer updatebyexist = orderShowMapper.updateByExist(ordersId);
|
||||
if(updatebyexist > 0){
|
||||
return Result.success(ordersId,"复原订单成功(逻辑)");
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
orders_state,
|
||||
orders_launchdate
|
||||
FROM `orders`
|
||||
where exist = 1
|
||||
</sql>
|
||||
|
||||
<!--com.muyu.common.system.domain.SysUser-->
|
||||
|
@ -49,16 +48,11 @@
|
|||
<if test=" ordersState != null "> AND orders_state = #{ordersState} </if>
|
||||
<if test="startDate!=null and startDate!=''"> AND orders_launchdate >=#{startDate} </if>
|
||||
<if test="endDate!=null and endDate!=''"> AND orders_launchdate <=#{endDate} </if>
|
||||
AND exist = 1
|
||||
AND `orders`.exist = 1
|
||||
</where>
|
||||
ORDER BY orders_launchdate DESC
|
||||
</select>
|
||||
|
||||
<!--根据ordersId回显数据-->
|
||||
<select id="findAllById" resultMap="goodsResult">
|
||||
<include refid="ordersSql"/> WHERE orders_id = #{ordersId}
|
||||
</select>
|
||||
|
||||
<!--添加订单到-->
|
||||
<insert id="addOrdeds">
|
||||
INSERT INTO `orders`
|
||||
|
@ -69,25 +63,33 @@
|
|||
|
||||
<update id="updateOrders">
|
||||
UPDATE `orders` SET
|
||||
`orders_product` = #{ordersProduct},
|
||||
`orders_price` = #{ordersPrice},
|
||||
`orders_specification` = #{ordersSpecification},
|
||||
`orders_state` = #{ordersState}
|
||||
WHERE `orders_id` IS #{ordersId};
|
||||
`orders`.`orders_product` = #{ordersProduct},
|
||||
`orders`.`orders_price` = #{ordersPrice},
|
||||
`orders`.`orders_specification` = #{ordersSpecification},
|
||||
`orders`.`orders_state` = #{ordersState}
|
||||
WHERE `orders`.`orders_id` = #{ordersId}
|
||||
</update>
|
||||
|
||||
<!-- 逻辑删除 改变字段状态 -->
|
||||
<!-- 逻辑删除 改变字段状态 -->
|
||||
<update id="updateByeExist">
|
||||
UPDATE `orders` SET `exist` = 0 WHERE `orders_id` IS #{ordersId}
|
||||
UPDATE `orders` SET `orders`.`exist` = 0 WHERE `orders`.`orders_id` = #{ordersId}
|
||||
</update>
|
||||
<!-- 逻辑字段 修改字段状态 -->
|
||||
<update id="updateByExist">
|
||||
UPDATE `orders` SET `exist` = 1 WHERE `orders_id` IS #{ordersId}
|
||||
UPDATE `orders` SET `orders`.`exist` = 1 WHERE `orders`.`orders_id` = #{ordersId}
|
||||
</update>
|
||||
|
||||
<!--订单回显-->
|
||||
<!-- 彻底删除(根据orderid删除数据库字段)-->
|
||||
<delete id="delByOrderId">
|
||||
DELETE FROM `orders` WHERE `orders_id` IS #{ordersId}
|
||||
DELETE FROM `orders` WHERE `orders`.`orders_id` = #{ordersId}
|
||||
</delete>
|
||||
|
||||
|
||||
<!--订单回显: 根据ordersId回显数据-->
|
||||
<select id="findAllById" resultMap="goodsResult">
|
||||
<include refid="ordersSql"/>
|
||||
WHERE `orders`.`orders_id` = #{ordersId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue