(select count(*) from (select tc.cattle_brand_id from t_user_cattle tc where tc.user_id = #{userId} and tc.is_share = '0' GROUP BY tc.cattle_brand_id)tab) as cattleTypeNum
(select count(*) from (select tc.cattle_brand_id from t_user_cattle tc where tc.user_id = #{userId} and tc.is_share = '0' GROUP BY tc.cattle_brand_id)tab) as cattleTypeNum
from
from
...
@@ -94,6 +95,12 @@
...
@@ -94,6 +95,12 @@
SET is_flag = '1'
SET is_flag = '1'
where id = #{id}
where id = #{id}
</update>
</update>
<updateid="saveFirstIntoCattle">
UPDATE t_user set is_first_to_cattle = '1' where user_id = #{userId}