Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0d2888b2d3
|
|
@ -1,21 +1,7 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||
import cn.ysk.cashier.config.security.security.TokenProvider;
|
||||
import cn.ysk.cashier.config.security.service.OnlineUserService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
|
||||
|
|
@ -33,6 +19,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
|
|
@ -81,8 +68,9 @@ public class TbShopInfoController {
|
|||
|
||||
@ApiOperation("修改商户密码")
|
||||
@PostMapping(value = "/shop/upPass")
|
||||
public ResponseEntity<Object> upShopPass(HttpServletRequest request, @RequestBody String username,String password) throws Exception {
|
||||
tbShopInfoService.upShopPass(username,password);
|
||||
@AnonymousPostMapping
|
||||
public ResponseEntity<Object> upShopPass(HttpServletRequest request, @RequestBody Map<String, String> map) throws Exception {
|
||||
tbShopInfoService.upShopPass(map.get("username"),map.get("password"));
|
||||
//根据token踢出用户
|
||||
// onlineUserService.logout(tokenProvider.getToken(request));
|
||||
log.info("修改商户密码成功。");
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class StockQueryDto {
|
|||
private String shopId;
|
||||
private Double num;
|
||||
private Integer isStock;
|
||||
private Integer categoryId;
|
||||
private String categoryId;
|
||||
|
||||
public void setName(String name) {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
|
|
@ -18,6 +18,12 @@ public class StockQueryDto {
|
|||
}
|
||||
}
|
||||
|
||||
public void setCategoryId(String categoryId) {
|
||||
if (StringUtils.isNotBlank(categoryId)) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
if (StringUtils.isNotBlank(shopId) && !shopId.equals("1")) {
|
||||
this.shopId = shopId;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public interface TbProductSkuRepository extends JpaRepository<TbProductSku, Inte
|
|||
"group by pro.id " +
|
||||
"order by number asc ")
|
||||
Page<StockV2Vo> searchProStockV2(@Param("shopId") String shopId, @Param("proName") String proName, @Param("isStock")Integer isStock,
|
||||
@Param("categoryId") Integer categoryId, Pageable pageable);
|
||||
@Param("categoryId") String categoryId, Pageable pageable);
|
||||
|
||||
@Query("SELECT new cn.ysk.cashier.vo.StockV2Vo(" +
|
||||
"sku.id,pro.id,pro.coverImg,pro.name,unit.name,pro.typeEnum,sku.specSnap,pro.isStock, " +
|
||||
|
|
|
|||
|
|
@ -229,7 +229,8 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||
String encPass = MD5Utils.encrypt(password);
|
||||
shopStaffRepository.updatePass(username,encPass,System.currentTimeMillis());
|
||||
merchantAccountRepository.updatePass(username,encPass,System.currentTimeMillis());
|
||||
userService.updatePass(username,passwordEncoder.encode(passwordEncoder.encode(password)));
|
||||
// passwordEncoder.encode(passwordEncoder.encode(password))
|
||||
userService.updatePass(username,passwordEncoder.encode(password));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue