Commit 85fb6d39 by XiaHou

权星相关接口修复

parent 318c8f52
......@@ -69,8 +69,9 @@ public class PmsProductController {
public CommonResult<CommonPage<PmsProductDto>> getPageList(@ApiParam("页数") @RequestParam("page")Integer page, @ApiParam("每页大小")@RequestParam("size")Integer size,
@ApiParam("模糊查询商品名称 ")@RequestParam("name") String name,
@ApiParam("模糊查询商品供应商名称 ")@RequestParam("mchtName") String mchtName,
@ApiParam("审核状态 0待审核 1审核通过 2审核未通过 ")@RequestParam("verifyStatus") Integer verifyStatus){
return CommonResult.success(CommonPage.restPage(this.productService.getPageList(page,size,name,verifyStatus,mchtName)));
@ApiParam("审核状态 0待审核 1审核通过 2审核未通过 ")@RequestParam("verifyStatus") Integer verifyStatus,
@ApiParam("商品供应商id ")@RequestParam("mchtId") Long mchtId){
return CommonResult.success(CommonPage.restPage(this.productService.getPageList(page,size,name,verifyStatus,mchtName,mchtId)));
}
@ApiOperation("权星后台_根据商品id修改一条商品数据")
......
......@@ -45,7 +45,7 @@ public class UmsMember implements Serializable {
@ApiModelProperty(value = "职业")
private String job;
@ApiModelProperty(value = "个性签名")
@ApiModelProperty(value = "个性签名(说明)")
private String personalizedSignature;
@ApiModelProperty(value = "用户来源")
......
......@@ -139,10 +139,13 @@
</if>
</delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMember">
insert into ums_member (id, member_level_id, username,
password, nickname, phone,
status, icon, gender,
birthday, city, job, personalized_signature,
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ums_member (member_level_id, username, password,
nickname, phone, status,
icon, gender, birthday,
city, job, personalized_signature,
source_type, integration, growth,
create_date, create_by, update_date,
update_by, delete_status, name,
......@@ -153,10 +156,10 @@
invitation_code, invitation_code_id, union_id,
label, distribution_level, accouunt_type,
login_time)
values (#{id,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR},
values (#{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, #{birthday,jdbcType=DATE},
#{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER},
#{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
......@@ -169,11 +172,11 @@
#{loginTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMember">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ums_member
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberLevelId != null">
member_level_id,
</if>
......@@ -290,9 +293,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="memberLevelId != null">
#{memberLevelId,jdbcType=BIGINT},
</if>
......
......@@ -171,7 +171,7 @@ public interface PmsProductService {
* @param name
* @return
*/
List<PmsProductDto> getPageList(Integer pageNum, Integer pageSize, String name, Integer auditStatus, String mchtName);
List<PmsProductDto> getPageList(Integer pageNum, Integer pageSize, String name, Integer auditStatus, String mchtName,Long mchtId);
/**
* 根据Id修改传入参数
......
......@@ -762,12 +762,13 @@ public class PmsProductServiceImpl implements PmsProductService {
* @return
*/
@Override
public List<PmsProductDto> getPageList(Integer pageNum,Integer pageSize,String name,Integer verifyStatus,String mchtName){
public List<PmsProductDto> getPageList(Integer pageNum,Integer pageSize,String name,Integer verifyStatus,String mchtName,Long mchtId){
PageHelper.startPage(pageNum, pageSize);
PmsProductDto pmsProductDto = new PmsProductDto();
pmsProductDto.setName(name);
pmsProductDto.setVerifyStatus(verifyStatus);
pmsProductDto.setMchtName(mchtName);
pmsProductDto.setMchtId(mchtId);
return this.pmsProductDao.selectProductListByOther(pmsProductDto);
}
......
......@@ -6,6 +6,7 @@ import com.macro.mall.dao.UmsAdminDao;
import com.macro.mall.dao.UmsAdminPermissionRelationDao;
import com.macro.mall.dao.UmsAdminRoleRelationDao;
import com.macro.mall.domain.AdminUpdateParam;
import com.macro.mall.domain.MemberDetails;
import com.macro.mall.domain.dto.AdminManageParam;
import com.macro.mall.domain.dto.UmsAdminParam;
import com.macro.mall.domain.dto.UmsAdminQueryParam;
......@@ -18,10 +19,13 @@ import com.macro.mall.service.mcht.PmsMchtShopInfoService;
import com.macro.mall.service.member.UmsMemberService;
import com.macro.mall.service.system.UmsAdminService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
......@@ -637,4 +641,6 @@ public class UmsAdminServiceImpl implements UmsAdminService {
List<UmsAdminRoleRelation> umsAdminRoleRelations = adminRoleRelationMapper.selectByExample(example);
return umsAdminRoleRelations.get(0).getRoleId();
}
}
......@@ -603,6 +603,9 @@
<if test="mchtName != null and mchtName != ''">
AND b.name like CONCAT('%',#{mchtName},'%')
</if>
<if test="mchtId != null ">
AND a.mcht_id = #{mchtId}
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment