|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.core.constance.MatrixConstance; | 
|---|
|  |  |  | import com.matrix.core.pojo.AjaxResult; | 
|---|
|  |  |  | import com.matrix.core.pojo.PaginationVO; | 
|---|
|  |  |  | import com.matrix.core.tools.EncrypUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.StringUtils; | 
|---|
|  |  |  | import com.matrix.core.tools.WebUtil; | 
|---|
|  |  |  | import com.matrix.system.app.dto.AddVipDto; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.matrix.system.common.bean.SysUsers; | 
|---|
|  |  |  | import com.matrix.system.common.dao.CustomerDataDictionaryDao; | 
|---|
|  |  |  | import com.matrix.system.common.tools.DataAuthUtil; | 
|---|
|  |  |  | import com.matrix.system.common.tools.PasswordUtil; | 
|---|
|  |  |  | import com.matrix.system.hive.action.BaseController; | 
|---|
|  |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
|---|
|  |  |  | import com.matrix.system.hive.bean.*; | 
|---|
|  |  |  | import com.matrix.system.hive.dao.MoneyCardUseDao; | 
|---|
|  |  |  | import com.matrix.system.hive.dao.VipAnswerDao; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.UnsupportedEncodingException; | 
|---|
|  |  |  | import java.security.NoSuchAlgorithmException; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | if (StringUtils.isBlank(vipInfoListDto.getOrder())) { | 
|---|
|  |  |  | vipInfoListDto.setOrder("asc"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int offset = (vipInfoListDto.getPageNum() - 1) * vipInfoListDto.getPageSize(); | 
|---|
|  |  |  | int limit = vipInfoListDto.getPageSize(); | 
|---|
|  |  |  | vipInfoListDto.setOffset(offset); | 
|---|
|  |  |  | vipInfoListDto.setLimit(limit); | 
|---|
|  |  |  | return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipAddressBook(vipInfoListDto)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if(!DataAuthUtil.hasAllShopAuth()) { | 
|---|
|  |  |  | sysVipInfo.setShopId(user.getShopId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryUtil.setQueryLimitCom(sysVipInfo); | 
|---|
|  |  |  | return AjaxResult.buildSuccessInstance(sysVipInfoService.findAll(sysVipInfo)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return AjaxResult.buildSuccessInstance("档案更新成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "用户是否存在资金密码", notes = "用户是否存在资金密码") | 
|---|
|  |  |  | @GetMapping(value = "/isExistFundPassword/{vipId}") | 
|---|
|  |  |  | public AjaxResult isExistFundPassword(@PathVariable(value = "vipId") Long vipId) { | 
|---|
|  |  |  | SysVipInfo vipInfo = sysVipInfoService.findById(vipId); | 
|---|
|  |  |  | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); | 
|---|
|  |  |  | if (StringUtils.isNotBlank(vipInfo.getPassWord())) { | 
|---|
|  |  |  | ajaxResult.putInMap("isExist", true); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | ajaxResult.putInMap("isExist", false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ajaxResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|