Browse Source

日常更新

master
xyiege 4 years ago
parent
commit
052f0c429a
  1. 23
      src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java
  2. 4
      src/main/resources/mapper/szwh/GoodsMapper.xml

23
src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java

@ -8,6 +8,7 @@ import cn.chjyj.szwh.exception.ChException;
import cn.chjyj.szwh.service.GoodsDetailService;
import cn.chjyj.szwh.service.GoodsService;
import cn.chjyj.szwh.service.UserService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -166,6 +167,28 @@ public class AdminGoodsController extends BaseController {
return jsonObject;
}
/**
* 添加到排行榜
* @param rejson
* @return
*/
@PostMapping("/addRanking")
public JSONObject addRanking(@RequestBody String rejson){
JSONObject json = JSON.parseObject(rejson);
String goodsIsli= json.getString("goods_isli");
log.info("add rank :"+goodsIsli);
return jsonObject;
}
@PostMapping("/rankingSort")
public JSONObject rankingSort(@RequestBody String rejson){
JSONObject json = JSON.parseObject(rejson);
String goodsIsli= json.getString("goods_isli");
String type = json.getString("json");
return jsonObject;
}
/**
* 商品来源详情
* @param jstr vue端发送来的json字符串

4
src/main/resources/mapper/szwh/GoodsMapper.xml

@ -57,7 +57,7 @@
<where>
<if test="map!=null">
<foreach collection="map" item="v" index="k" separator="and">
<if test="v != null and v != '' and k!='id'">
<if test="v != null and v != '' and k!='orderway'">
${k} = #{v}
</if>
</foreach>
@ -78,7 +78,7 @@
<where>
<if test="map!=null">
<foreach collection="map" item="v" index="k" separator="and">
<if test="v != null and v != '' and k!='id'">
<if test="v != null and v != '' and k!='orderway'">
${k} = #{v}
</if>
</foreach>

Loading…
Cancel
Save