提交 033b04b5 authored 作者: zgy's avatar zgy

修改商品管理功能:除管理员,其他人员只能看到自己上传的商品

上级 8c98b2d5
......@@ -64,6 +64,11 @@ public class TbCfStationItemController extends ApiBaseAction {
@RequiresPermissions("tbcfstationitem:list")
@ResponseBody
public R list(@RequestParam Map<String, Object> params) {
if (!Constant.SUPER_ADMIN.equals(ShiroUtils.getUserId())) {
params.put("creator", ShiroUtils.getUserId());
}
String userId = ShiroUtils.getUserId();
System.out.println(userId);
//查询列表数据
Query query = new Query(params);
......
......@@ -144,6 +144,9 @@
left JOIN tb_cf_express_template e ON i.item_descrition_id = e.template_id
left join sys_user u on i.creator=u.user_id
WHERE 1=1 and i.enable_flag!=0
<if test="creator != null and creator.trim() != ''">
AND creator=#{creator}
</if>
<if test="name != null and name.trim() != ''">
AND item_name LIKE concat('%',#{name},'%') or item_id LIKE concat('%',#{name},'%')
</if>
......@@ -300,7 +303,7 @@
<if test="itemSku != null">`item_sku` = #{itemSku},</if>
<if test="itemTop != null">`item_top` = #{itemTop},</if>
<if test="supplier != null">`supplier` = #{supplier},</if>
<if test="skuImgs != null">`sku_imgs` = #{skuImgs}, </if>
<if test="skuImgs != null">`sku_imgs` = #{skuImgs},</if>
<if test="platformCode != null">`platform_code` = #{platformCode},</if>
<if test="platformName != null">`platform_name` = #{platformName},</if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag},</if>
......
......@@ -588,7 +588,7 @@
multiple
action="../api/osstest/uploadtest"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess" :show-upload-list="false" accept="image/jpeg, image/png">
:on-success="vhandleSuccess" :show-upload-list="false" accept="image/jpeg, image/png">
<i-button icon="ios-cloud-upload-outline">请选择图片</i-button>
</upload>
<div style="display: flex;position: relative;">
......
......@@ -298,6 +298,7 @@ let vm = new Vue({
vm.tbCfStationItem.putaway = this.putaway
this.$set(vm.tbCfStationItem, 'tree', this.attrItem)
let _this = this
console.log(11111,vm.uploadList)
vm.tbCfStationItem.itemImg = vm.uploadList.map(res => res).join(';');
vm.tbCfStationItem.itemDesc = encodeURI(UE.getEditor('itemDesc').getContent()); // 富文本取值
vm.tbCfStationItem.itemDesc = vm.tbCfStationItem.itemDesc.replace(/&nbsp;/g, " ");
......@@ -523,8 +524,9 @@ let vm = new Vue({
// },
/** ******************************************************************************************** */
handleSuccess(response, file, fileList) {
vhandleSuccess(response, file, fileList) {
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
console.log('shangchuan',response)
vm.uploadList.push(response);
$("#itemImg").show();
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论