Authored by chenchao

define api and db mapper

package com.yohoufo.dal.order;
import com.yohoufo.dal.order.model.AppraiseOrderMeta;
public interface AppraiseOrderMetaMapper {
int deleteByPrimaryKey(Integer id);
int insert(AppraiseOrderMeta record);
int insertSelective(AppraiseOrderMeta record);
AppraiseOrderMeta selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AppraiseOrderMeta record);
int updateByPrimaryKey(AppraiseOrderMeta record);
}
\ No newline at end of file
... ...
package com.yohoufo.dal.order;
import com.yohoufo.dal.order.model.AppraiseOrderStorage;
public interface AppraiseOrderStorageMapper {
int deleteByPrimaryKey(Integer id);
int insert(AppraiseOrderStorage record);
int insertSelective(AppraiseOrderStorage record);
AppraiseOrderStorage selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AppraiseOrderStorage record);
int updateByPrimaryKey(AppraiseOrderStorage record);
}
\ No newline at end of file
... ...
... ... @@ -10,11 +10,13 @@ public class AppraiseOrder {
private Integer uid;
private Long parentOrderCode;
private Long orderCode;
private Byte clientType;
private Integer clientType;
private Byte payment;
private Integer payment;
private BigDecimal amount;
... ... @@ -26,7 +28,11 @@ public class AppraiseOrder {
private Integer updateTime;
private Byte isDel;
private Integer isDel;
private String channelNo;
private Integer attributes;
private Byte platformDeliveryStatus;
}
\ No newline at end of file
... ...
package com.yohoufo.dal.order.model;
import lombok.Data;
@Data
public class AppraiseOrderGoods {
private Integer id;
... ... @@ -13,51 +16,8 @@ public class AppraiseOrderGoods {
private String imageUrl;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public Integer getProductId() {
return productId;
}
public void setProductId(Integer productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName == null ? null : productName.trim();
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode == null ? null : productCode.trim();
}
private Integer depotNo;
public String getImageUrl() {
return imageUrl;
}
private Integer num;
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl == null ? null : imageUrl.trim();
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.order.model;
public class AppraiseOrderMeta {
private Integer id;
private Integer uid;
private Long orderCode;
private Integer storageId;
private String metaKey;
private String metaValue;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public Integer getStorageId() {
return storageId;
}
public void setStorageId(Integer storageId) {
this.storageId = storageId;
}
public String getMetaKey() {
return metaKey;
}
public void setMetaKey(String metaKey) {
this.metaKey = metaKey == null ? null : metaKey.trim();
}
public String getMetaValue() {
return metaValue;
}
public void setMetaValue(String metaValue) {
this.metaValue = metaValue == null ? null : metaValue.trim();
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.order.model;
public class AppraiseOrderStorage {
private Integer id;
private Long orderCode;
private Integer productId;
private Integer sizeId;
private String sizeName;
private Integer colorId;
private String colorName;
private Integer storageId;
private Integer num;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public Integer getProductId() {
return productId;
}
public void setProductId(Integer productId) {
this.productId = productId;
}
public Integer getSizeId() {
return sizeId;
}
public void setSizeId(Integer sizeId) {
this.sizeId = sizeId;
}
public String getSizeName() {
return sizeName;
}
public void setSizeName(String sizeName) {
this.sizeName = sizeName == null ? null : sizeName.trim();
}
public Integer getColorId() {
return colorId;
}
public void setColorId(Integer colorId) {
this.colorId = colorId;
}
public String getColorName() {
return colorName;
}
public void setColorName(String colorName) {
this.colorName = colorName == null ? null : colorName.trim();
}
public Integer getStorageId() {
return storageId;
}
public void setStorageId(Integer storageId) {
this.storageId = storageId;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
}
\ No newline at end of file
... ...
... ... @@ -8,9 +8,11 @@
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="product_code" jdbcType="VARCHAR" property="productCode" />
<result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
<result column="depot_no" jdbcType="INTEGER" property="depotNo" />
<result column="num" jdbcType="INTEGER" property="num" />
</resultMap>
<sql id="Base_Column_List">
id, order_code, product_id, product_name, product_code, image_url
id, order_code, product_id, product_name, product_code, image_url, depot_no, num
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
... ... @@ -21,9 +23,11 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods" useGeneratedKeys="true">
insert into appraise_order_goods (order_code, product_id, product_name,
product_code, image_url)
product_code, image_url, depot_no,
num)
values (#{orderCode,jdbcType=BIGINT}, #{productId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR},
#{productCode,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR})
#{productCode,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{depotNo,jdbcType=INTEGER},
#{num,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods" useGeneratedKeys="true">
... ... @@ -44,6 +48,12 @@
<if test="imageUrl != null">
image_url,
</if>
<if test="depotNo != null">
depot_no,
</if>
<if test="num != null">
num,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderCode != null">
... ... @@ -61,6 +71,12 @@
<if test="imageUrl != null">
#{imageUrl,jdbcType=VARCHAR},
</if>
<if test="depotNo != null">
#{depotNo,jdbcType=INTEGER},
</if>
<if test="num != null">
#{num,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods">
... ... @@ -81,6 +97,12 @@
<if test="imageUrl != null">
image_url = #{imageUrl,jdbcType=VARCHAR},
</if>
<if test="depotNo != null">
depot_no = #{depotNo,jdbcType=INTEGER},
</if>
<if test="num != null">
num = #{num,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
... ... @@ -90,7 +112,9 @@
product_id = #{productId,jdbcType=INTEGER},
product_name = #{productName,jdbcType=VARCHAR},
product_code = #{productCode,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR}
image_url = #{imageUrl,jdbcType=VARCHAR},
depot_no = #{depotNo,jdbcType=INTEGER},
num = #{num,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.AppraiseOrder">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="uid" jdbcType="INTEGER" property="uid" />
<result column="parent_order_code" jdbcType="BIGINT" property="parentOrderCode" />
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
<result column="client_type" jdbcType="TINYINT" property="clientType" />
<result column="payment" jdbcType="TINYINT" property="payment" />
... ... @@ -14,10 +15,12 @@
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="channel_no" jdbcType="VARCHAR" property="channelNo" />
<result column="attributes" jdbcType="INTEGER" property="attributes" />
<result column="platform_delivery_status" jdbcType="TINYINT" property="platformDeliveryStatus" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, client_type, payment, amount, ship_fee, status, create_time,
update_time, is_del, channel_no
id, uid, parent_order_code, order_code, client_type, payment, amount, ship_fee, status,
create_time, update_time, is_del, channel_no, attributes, platform_delivery_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
... ... @@ -28,14 +31,16 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrder" useGeneratedKeys="true">
insert into appraise_order (uid, order_code, client_type,
payment, amount, ship_fee,
status, create_time, update_time,
is_del, channel_no)
values (#{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, #{clientType,jdbcType=TINYINT},
#{payment,jdbcType=TINYINT}, #{amount,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL},
#{status,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{isDel,jdbcType=TINYINT}, #{channelNo,jdbcType=VARCHAR})
insert into appraise_order (uid, parent_order_code, order_code,
client_type, payment, amount,
ship_fee, status, create_time,
update_time, is_del, channel_no,
attributes, platform_delivery_status)
values (#{uid,jdbcType=INTEGER}, #{parentOrderCode,jdbcType=BIGINT}, #{orderCode,jdbcType=BIGINT},
#{clientType,jdbcType=TINYINT}, #{payment,jdbcType=TINYINT}, #{amount,jdbcType=DECIMAL},
#{shipFee,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER},
#{updateTime,jdbcType=INTEGER}, #{isDel,jdbcType=TINYINT}, #{channelNo,jdbcType=VARCHAR},
#{attributes,jdbcType=INTEGER}, #{platformDeliveryStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrder" useGeneratedKeys="true">
insert into appraise_order
... ... @@ -43,6 +48,9 @@
<if test="uid != null">
uid,
</if>
<if test="parentOrderCode != null">
parent_order_code,
</if>
<if test="orderCode != null">
order_code,
</if>
... ... @@ -73,11 +81,20 @@
<if test="channelNo != null">
channel_no,
</if>
<if test="attributes != null">
attributes,
</if>
<if test="platformDeliveryStatus != null">
platform_delivery_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="uid != null">
#{uid,jdbcType=INTEGER},
</if>
<if test="parentOrderCode != null">
#{parentOrderCode,jdbcType=BIGINT},
</if>
<if test="orderCode != null">
#{orderCode,jdbcType=BIGINT},
</if>
... ... @@ -108,6 +125,12 @@
<if test="channelNo != null">
#{channelNo,jdbcType=VARCHAR},
</if>
<if test="attributes != null">
#{attributes,jdbcType=INTEGER},
</if>
<if test="platformDeliveryStatus != null">
#{platformDeliveryStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.AppraiseOrder">
... ... @@ -116,6 +139,9 @@
<if test="uid != null">
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="parentOrderCode != null">
parent_order_code = #{parentOrderCode,jdbcType=BIGINT},
</if>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=BIGINT},
</if>
... ... @@ -146,12 +172,19 @@
<if test="channelNo != null">
channel_no = #{channelNo,jdbcType=VARCHAR},
</if>
<if test="attributes != null">
attributes = #{attributes,jdbcType=INTEGER},
</if>
<if test="platformDeliveryStatus != null">
platform_delivery_status = #{platformDeliveryStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.AppraiseOrder">
update appraise_order
set uid = #{uid,jdbcType=INTEGER},
parent_order_code = #{parentOrderCode,jdbcType=BIGINT},
order_code = #{orderCode,jdbcType=BIGINT},
client_type = #{clientType,jdbcType=TINYINT},
payment = #{payment,jdbcType=TINYINT},
... ... @@ -161,7 +194,9 @@
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
is_del = #{isDel,jdbcType=TINYINT},
channel_no = #{channelNo,jdbcType=VARCHAR}
channel_no = #{channelNo,jdbcType=VARCHAR},
attributes = #{attributes,jdbcType=INTEGER},
platform_delivery_status = #{platformDeliveryStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.order.AppraiseOrderMetaMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.AppraiseOrderMeta">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="uid" jdbcType="INTEGER" property="uid" />
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
<result column="storage_id" jdbcType="INTEGER" property="storageId" />
<result column="meta_key" jdbcType="VARCHAR" property="metaKey" />
<result column="meta_value" jdbcType="VARCHAR" property="metaValue" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, storage_id, meta_key, meta_value
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from appraise_order_meta
where id = #{id,jdbcType=INTEGER}
</select>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderMeta" useGeneratedKeys="true">
insert into appraise_order_meta (uid, order_code, storage_id,
meta_key, meta_value)
values (#{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, #{storageId,jdbcType=INTEGER},
#{metaKey,jdbcType=VARCHAR}, #{metaValue,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderMeta" useGeneratedKeys="true">
insert into appraise_order_meta
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="uid != null">
uid,
</if>
<if test="orderCode != null">
order_code,
</if>
<if test="storageId != null">
storage_id,
</if>
<if test="metaKey != null">
meta_key,
</if>
<if test="metaValue != null">
meta_value,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="uid != null">
#{uid,jdbcType=INTEGER},
</if>
<if test="orderCode != null">
#{orderCode,jdbcType=BIGINT},
</if>
<if test="storageId != null">
#{storageId,jdbcType=INTEGER},
</if>
<if test="metaKey != null">
#{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
#{metaValue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.AppraiseOrderMeta">
update appraise_order_meta
<set>
<if test="uid != null">
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=BIGINT},
</if>
<if test="storageId != null">
storage_id = #{storageId,jdbcType=INTEGER},
</if>
<if test="metaKey != null">
meta_key = #{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
meta_value = #{metaValue,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.AppraiseOrderMeta">
update appraise_order_meta
set uid = #{uid,jdbcType=INTEGER},
order_code = #{orderCode,jdbcType=BIGINT},
storage_id = #{storageId,jdbcType=INTEGER},
meta_key = #{metaKey,jdbcType=VARCHAR},
meta_value = #{metaValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.order.AppraiseOrderStorageMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.AppraiseOrderStorage">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="size_id" jdbcType="INTEGER" property="sizeId" />
<result column="size_name" jdbcType="VARCHAR" property="sizeName" />
<result column="color_id" jdbcType="INTEGER" property="colorId" />
<result column="color_name" jdbcType="VARCHAR" property="colorName" />
<result column="storage_id" jdbcType="INTEGER" property="storageId" />
<result column="num" jdbcType="INTEGER" property="num" />
</resultMap>
<sql id="Base_Column_List">
id, order_code, product_id, size_id, size_name, color_id, color_name, storage_id,
num
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from appraise_order_storage
where id = #{id,jdbcType=INTEGER}
</select>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderStorage" useGeneratedKeys="true">
insert into appraise_order_storage (order_code, product_id, size_id,
size_name, color_id, color_name,
storage_id, num)
values (#{orderCode,jdbcType=BIGINT}, #{productId,jdbcType=INTEGER}, #{sizeId,jdbcType=INTEGER},
#{sizeName,jdbcType=VARCHAR}, #{colorId,jdbcType=INTEGER}, #{colorName,jdbcType=VARCHAR},
#{storageId,jdbcType=INTEGER}, #{num,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.AppraiseOrderStorage" useGeneratedKeys="true">
insert into appraise_order_storage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderCode != null">
order_code,
</if>
<if test="productId != null">
product_id,
</if>
<if test="sizeId != null">
size_id,
</if>
<if test="sizeName != null">
size_name,
</if>
<if test="colorId != null">
color_id,
</if>
<if test="colorName != null">
color_name,
</if>
<if test="storageId != null">
storage_id,
</if>
<if test="num != null">
num,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderCode != null">
#{orderCode,jdbcType=BIGINT},
</if>
<if test="productId != null">
#{productId,jdbcType=INTEGER},
</if>
<if test="sizeId != null">
#{sizeId,jdbcType=INTEGER},
</if>
<if test="sizeName != null">
#{sizeName,jdbcType=VARCHAR},
</if>
<if test="colorId != null">
#{colorId,jdbcType=INTEGER},
</if>
<if test="colorName != null">
#{colorName,jdbcType=VARCHAR},
</if>
<if test="storageId != null">
#{storageId,jdbcType=INTEGER},
</if>
<if test="num != null">
#{num,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.AppraiseOrderStorage">
update appraise_order_storage
<set>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=BIGINT},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="sizeId != null">
size_id = #{sizeId,jdbcType=INTEGER},
</if>
<if test="sizeName != null">
size_name = #{sizeName,jdbcType=VARCHAR},
</if>
<if test="colorId != null">
color_id = #{colorId,jdbcType=INTEGER},
</if>
<if test="colorName != null">
color_name = #{colorName,jdbcType=VARCHAR},
</if>
<if test="storageId != null">
storage_id = #{storageId,jdbcType=INTEGER},
</if>
<if test="num != null">
num = #{num,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.AppraiseOrderStorage">
update appraise_order_storage
set order_code = #{orderCode,jdbcType=BIGINT},
product_id = #{productId,jdbcType=INTEGER},
size_id = #{sizeId,jdbcType=INTEGER},
size_name = #{sizeName,jdbcType=VARCHAR},
color_id = #{colorId,jdbcType=INTEGER},
color_name = #{colorName,jdbcType=VARCHAR},
storage_id = #{storageId,jdbcType=INTEGER},
num = #{num,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -31,14 +31,14 @@ public class AppraiseOrderController {
* @param productId
* @return
*/
@RequestMapping(params = "method=ufo.appriseOrder.compute")
@RequestMapping(params = "method=ufo.appraiseOrder.compute")
public ApiResponse compute(@RequestParam(name = "uid")int uid,
@RequestParam(name = "productId")int productId){
AppraiseOrderComputeReq req = AppraiseOrderComputeReq.builder()
.uid(uid)
.productId(productId)
.build();
logger.info("in ufo.appriseOrder.compute req {}", req);
logger.info("in ufo.appraiseOrder.compute req {}", req);
AppraiseOrderComputeResp resp = appraiseOrderService.compute(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
... ... @@ -48,13 +48,13 @@ public class AppraiseOrderController {
}
@RequestMapping(params = "method=ufo.appriseOrder.submit")
@RequestMapping(params = "method=ufo.appraiseOrder.submit")
public ApiResponse submit(@RequestParam(name = "uid")int uid,
@RequestParam(name = "productId")int productId,
@RequestParam(name = "addressId") String addressId){
AppraiseOrderSubmitReq req = AppraiseOrderSubmitReq.builder()
.uid(uid).productId(productId).addressId(addressId).build();
logger.info("in ufo.appriseOrder.submit req {}", req);
logger.info("in ufo.appraiseOrder.submit req {}", req);
AppraiseOrderSubmitResp resp = appraiseOrderService.submit(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
... ... @@ -69,7 +69,7 @@ public class AppraiseOrderController {
* @param uid
* @return
*/
@RequestMapping(params = "method=ufo.appriseOrder.list")
@RequestMapping(params = "method=ufo.appraiseOrder.list")
public ApiResponse list(@RequestParam(name = "uid")int uid,
@RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "limit", required = false, defaultValue = "10") int limit){
... ... @@ -77,7 +77,7 @@ public class AppraiseOrderController {
AppraiseOrderListReq req = AppraiseOrderListReq.builder()
.uid(uid).limit(limit).page(page).build();
logger.info("in ufo.appriseOrder.list req {}", req);
logger.info("in ufo.appraiseOrder.list req {}", req);
AppraiseOrderListResp resp = appraiseOrderService.getOrderList(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
... ... @@ -87,11 +87,11 @@ public class AppraiseOrderController {
}
@RequestMapping(params = "method=ufo.appriseOrder.detail")
@RequestMapping(params = "method=ufo.appraiseOrder.detail")
public ApiResponse detail(@RequestParam(name = "uid")int uid,
@RequestParam(name = "orderCode")long orderCode){
AppraiseOrderDetailReq req = AppraiseOrderDetailReq.builder().uid(uid).orderCode(orderCode).build();
logger.info("in ufo.appriseOrder.detail req {}", req);
logger.info("in ufo.appraiseOrder.detail req {}", req);
AppraiseOrderDetailResp resp = appraiseOrderService.getOrderDetail(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
... ...
package com.yohoufo.order.controller;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderDetailResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.order.service.seller.deposit.SellerDepositOrderService;
import com.yohoufo.order.utils.LoggerUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class SellerDepositOrderController {
private Logger logger = LoggerUtils.getSellerOrderLogger();
@Autowired
private SellerDepositOrderService sellerDepositOrderService;
@RequestMapping(params = "method=ufo.depositOrder.compute")
public ApiResponse compute(@RequestParam(name = "uid")int uid,
@RequestParam(name = "goodsList")String goodsList){
SellerDepositOrderComputeReq req = SellerDepositOrderComputeReq.builder()
.uid(uid).goodsList(goodsList).build();
logger.info("in ufo.depositOrder.compute req {}", req);
SellerDepositOrderComputeResp resp = sellerDepositOrderService.compute(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(resp)
.message("寄存计算成功")
.build();
}
@RequestMapping(params = "method=ufo.depositOrder.submit")
public ApiResponse submit(@RequestParam(name = "uid")int uid,
@RequestParam(name = "goodsList")String goodsList,
@RequestParam(name = "addressId") String addressId){
SellerDepositOrderSubmitReq req = SellerDepositOrderSubmitReq.builder()
.uid(uid).goodsList(goodsList).addressId(addressId).build();
logger.info("in ufo.depositOrder.submit req {}", req);
SellerDepositOrderSubmitResp resp = sellerDepositOrderService.submit(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(resp)
.message("寄存订单提交成功")
.build();
}
/**
* 商品付费寄存列表
* @param uid
* @return
*/
@RequestMapping(params = "method=ufo.depositOrder.list")
public ApiResponse list(@RequestParam(name = "uid")int uid,
@RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "limit", required = false, defaultValue = "10") int limit){
SellerDepositOrderListReq req = SellerDepositOrderListReq.builder()
.uid(uid).limit(limit).page(page).build();
logger.info("in ufo.depositOrder.list req {}", req);
SellerDepositOrderListResp resp = sellerDepositOrderService.getOrderList(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(resp)
.message("寄存订单列表查询成功")
.build();
}
@RequestMapping(params = "method=ufo.depositOrder.detail")
public ApiResponse detail(@RequestParam(name = "uid")int uid,
@RequestParam(name = "orderCode")long orderCode){
SellerDepositOrderDetailReq req = SellerDepositOrderDetailReq.builder()
.uid(uid).orderCode(orderCode).build();
logger.info("in ufo.depositOrder.detail req {}", req);
SellerDepositOrderDetailResp resp = sellerDepositOrderService.getOrderDetail(req);
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(resp)
.message("寄存订单详情查询成功")
.build();
}
}
... ...
package com.yohoufo.order.service.seller.deposit;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderDetailResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp;
import org.springframework.stereotype.Service;
@Service
public class SellerDepositOrderService {
public SellerDepositOrderComputeResp compute(SellerDepositOrderComputeReq req){
return null;
}
public SellerDepositOrderSubmitResp submit(SellerDepositOrderSubmitReq req){
return null;
}
public SellerDepositOrderListResp getOrderList(SellerDepositOrderListReq req ){
return null;
}
public SellerDepositOrderDetailResp getOrderDetail(SellerDepositOrderDetailReq req){
return null;
}
}
... ...
... ... @@ -115,6 +115,8 @@ datasources:
- com.yohoufo.dal.order.AlipayBlackUserMapper
- com.yohoufo.dal.order.AppraiseOrderMapper
- com.yohoufo.dal.order.AppraiseOrderGoodsMapper
- com.yohoufo.dal.order.AppraiseOrderMetaMapper
- com.yohoufo.dal.order.AppraiseOrderStorageMapper
ufo_promotion:
servers:
... ...
... ... @@ -114,6 +114,8 @@ datasources:
- com.yohoufo.dal.order.AlipayBlackUserMapper
- com.yohoufo.dal.order.AppraiseOrderMapper
- com.yohoufo.dal.order.AppraiseOrderGoodsMapper
- com.yohoufo.dal.order.AppraiseOrderMetaMapper
- com.yohoufo.dal.order.AppraiseOrderStorageMapper
ufo_promotion:
servers:
... ...