Commit 10c00fa6 by 张新旗

改不完得代码,直接够够得了

parent 74d1c0f1
package com.soss; package com.soss;
import com.soss.framework.web.domain.server.Sys;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
...@@ -18,6 +19,7 @@ public class RuoYiApplication ...@@ -18,6 +19,7 @@ public class RuoYiApplication
{ {
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
} }
......
...@@ -281,6 +281,7 @@ public class OrderServiceImpl implements IOrderService ...@@ -281,6 +281,7 @@ public class OrderServiceImpl implements IOrderService
} }
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHH"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHH");
String format = simpleDateFormat.format(new Date()); String format = simpleDateFormat.format(new Date());
format = format.substring(2);
String key = "orderNo"; String key = "orderNo";
RedisAtomicInteger redisAtomicInteger = new RedisAtomicInteger(key,SpringUtils.getBean(StringRedisTemplate.class).getConnectionFactory()); RedisAtomicInteger redisAtomicInteger = new RedisAtomicInteger(key,SpringUtils.getBean(StringRedisTemplate.class).getConnectionFactory());
int andIncrement = redisAtomicInteger.getAndIncrement(); int andIncrement = redisAtomicInteger.getAndIncrement();
......
...@@ -242,6 +242,7 @@ public class SysRoleServiceImpl implements ISysRoleService ...@@ -242,6 +242,7 @@ public class SysRoleServiceImpl implements ISysRoleService
public int insertRole(SysRole role) public int insertRole(SysRole role)
{ {
// 新增角色信息 // 新增角色信息
role.setRoleKey(role.getRoleName());
roleMapper.insertRole(role); roleMapper.insertRole(role);
return insertRoleMenu(role); return insertRoleMenu(role);
} }
...@@ -257,6 +258,7 @@ public class SysRoleServiceImpl implements ISysRoleService ...@@ -257,6 +258,7 @@ public class SysRoleServiceImpl implements ISysRoleService
public int updateRole(SysRole role) public int updateRole(SysRole role)
{ {
// 修改角色信息 // 修改角色信息
role.setRoleKey(role.getRoleName());
roleMapper.updateRole(role); roleMapper.updateRole(role);
// 删除角色与菜单关联 // 删除角色与菜单关联
roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId()); roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
......
...@@ -277,6 +277,9 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -277,6 +277,9 @@ public class SysUserServiceImpl implements ISysUserService
@Transactional @Transactional
public int updateUser(SysUser user) public int updateUser(SysUser user)
{ {
if(user.getRoles() ==null||user.getRoles().isEmpty()){
return userMapper.updateUser(user);
}
Long userId = user.getUserId(); Long userId = user.getUserId();
// 删除用户与角色关联 // 删除用户与角色关联
userRoleMapper.deleteUserRoleByUserId(userId); userRoleMapper.deleteUserRoleByUserId(userId);
......
...@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if> <if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> <if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where> </where>
order by turn
</select> </select>
<select id="selectShopGoodsById" parameterType="String" resultMap="ShopGoodsResult"> <select id="selectShopGoodsById" parameterType="String" resultMap="ShopGoodsResult">
...@@ -89,8 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -89,8 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.pics, g.pics,
g.`desc`, g.`desc`,
g.remarks, g.remarks,
sg.state, g.shelf_at as shelfAt,
g.code g.code,
'1' as state
from shop_goods sg ,goods g where sg.goods_id =g.id and g.state ='3' and g.is_deleted =0 from shop_goods sg ,goods g where sg.goods_id =g.id and g.state ='3' and g.is_deleted =0
and shop_id =#{shopId} and category =#{categoryId} and shop_id =#{shopId} and category =#{categoryId}
order by sg.turn order by sg.turn
......
...@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if> <if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> <if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="name != null "> and name = #{updatedAt}</if> <if test="name != null "> and name = #{updatedAt}</if>
</where> </where>
order by turn
</select> </select>
<select id="selectShopRecommendById" parameterType="String" resultMap="ShopRecommendResult"> <select id="selectShopRecommendById" parameterType="String" resultMap="ShopRecommendResult">
......
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