xie.kaifeng преди 7 месеца
родител
ревизия
7a9098cf9b

+ 8 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganController.java

@@ -243,8 +243,14 @@ public class OrganController {
     @ApiOperation("会员机构管理-->机构管理-->商品限制设置--> 新增、修改")
     @RequestMapping(method = RequestMethod.POST, value = "/addlimit")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult addlimit(@RequestBody MemberGoodsAddParam vo, HttpServletRequest request) {
-        return iOrganService.addlimit(vo, request);
+    private AjaxResult addlimit(@RequestBody String vo, HttpServletRequest request) {
+        try {
+            MemberGoodsAddParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(vo, request), MemberGoodsAddParam.class);
+            return iOrganService.addlimit(current, request);
+        } catch (Exception e) {
+            log.error("商品限制设置-->新增、修改失败,失败原因:" + Arrays.toString(e.getStackTrace()));
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
+        }
     }
 
     @ApiOperation("会员机构管理-->机构管理-->商品限制设置--> 删除")

+ 4 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/OrganServiceImpl.java

@@ -1037,6 +1037,10 @@ public class OrganServiceImpl implements IOrganService {
             config.setUserid(vo.getUserid());
             config.setGoodsid(vo.getGoodsid());
             config.setRoletype(vo.getRoletype());
+            config.setUpdatetime(new Date());
+            config.setIsnodisplay(vo.getIsnodisplay());
+            config.setIscannotbuy(vo.getIscannotbuy());
+            config.setIscannotsell(vo.getIscannotsell());
             iMembergoodslimitconfigMapper.insert(config);
         } else {
             config.setUpdatetime(new Date());

+ 2 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/UseraccountServiceImpl.java

@@ -216,6 +216,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
 
         detailResult.setUserAccountDetailVo(userAccountDetailVo);
         UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoNewDetail(userid);
+        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
         detailResult.setUserinfoDetailVo(userinfoDetailVo);
         return detailResult;
     }
@@ -225,6 +226,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         UserAccountDetailVo userAccountDetailVo = iUseraccountMapper.selectDetail(userid);
         detailResult.setUserAccountDetailVo(userAccountDetailVo);
         UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoDetail(userid);
+        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
         detailResult.setUserinfoDetailVo(userinfoDetailVo);
         return detailResult;
     }

+ 2 - 5
mtp3-century/src/main/resources/mapper/WskhUserinfoMapper.xml

@@ -166,17 +166,14 @@
     <select id="querymembergoodslimit" resultType="com.muchinfo.mtp3pojos.vo.organ.MemberGoodsLimitResult">
         select t.autoid "autoid", t.userid "userid", t.roletype "roletype", t.goodsid "goodsid",
         t.isnodisplay "isnodisplay", t.iscannotbuy "iscannotbuy", t.iscannotsell "iscannotsell",
+        g.marketid "marketid",
         ua.userid || '/' || ua.accountname "membername",
         g.goodscode || '/' || g.goodsname "goodsdisplay",
-        ei.enumdicname "roledisplay", ei2.enumdicname "nodisplay",
-        ei3.enumdicname "cannotbuy", ei4.enumdicname "cannotsell"
+        ei.enumdicname "roledisplay"
         from MemberGoodsLimitConfig t
         left join useraccount ua on t.userid = ua.userid
         left join goods g on t.goodsid = g.goodsid
         left join enumdicitem ei on ei.enumdiccode='roleType' and t.roletype = ei.enumitemname
-        left join enumdicitem ei2 on ei2.enumdiccode='flag' and t.isnodisplay = ei2.enumitemname
-        left join enumdicitem ei3 on ei3.enumdiccode='flag' and t.iscannotbuy = ei3.enumitemname
-        left join enumdicitem ei4 on ei4.enumdiccode='flag' and t.iscannotsell = ei4.enumitemname
         where 1 = 1
         <if test="vo.roletype !=null and vo.roletype!=''">
             and t.roletype = #{vo.roletype}

+ 9 - 3
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/organ/MemberGoodsLimitResult.java

@@ -26,11 +26,17 @@ public class MemberGoodsLimitResult {
     private String goodsdisplay;
 
     @ApiModelProperty(value = "不显示")
-    private Integer nodisplay;
+    private Integer isnodisplay;
 
     @ApiModelProperty(value = "不能挂买")
-    private Integer cannotbuy;
+    private Integer iscannotbuy;
 
     @ApiModelProperty(value = "不能挂卖")
-    private Integer cannotsell;
+    private Integer iscannotsell;
+
+    private Long userid;
+
+    private Long goodsid;
+
+    private Long marketid;
 }